File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ def text_( # noqa: PLR0912
225
225
if name == "angle" :
226
226
extra_arrays .append (np .atleast_1d (arg ))
227
227
else :
228
- extra_arrays .append (np .atleast_1d (arg ). astype ( str ))
228
+ extra_arrays .append (np .atleast_1d (np . asarray ( arg , dtype = str ) ))
229
229
230
230
# If an array of transparency is given, GMT will read it from the last numerical
231
231
# column per data record.
@@ -234,7 +234,7 @@ def text_( # noqa: PLR0912
234
234
kwargs ["t" ] = True
235
235
236
236
# Append text to the last column. Text must be passed in as str type.
237
- text = np .atleast_1d (text ). astype ( str )
237
+ text = np .atleast_1d (np . asarray ( text , dtype = str ) )
238
238
encoding = _check_encoding ("" .join (text ))
239
239
if encoding != "ascii" :
240
240
text = np .vectorize (non_ascii_to_octal , excluded = "encoding" )(
Original file line number Diff line number Diff line change 1
1
outs:
2
- - md5: 7c07b7792d61e8094468eab34e8bba50
3
- size: 12757
2
+ - md5: 41625972ee97af25965877eb78e0a673
3
+ size: 12270
4
4
path: test_text_nonstr_text.png
5
5
hash: md5
You can’t perform that action at this time.
0 commit comments