File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1809,9 +1809,9 @@ def virtualfile_in( # noqa: PLR0912
1809
1809
warnings .warn (message = msg , category = RuntimeWarning , stacklevel = 2 )
1810
1810
_data = (data ,) if not isinstance (data , pathlib .PurePath ) else (str (data ),)
1811
1811
elif kind == "vectors" :
1812
- _data = [np . atleast_1d ( x ), np . atleast_1d ( y ) ]
1812
+ _data = [x , y ]
1813
1813
if z is not None :
1814
- _data .append (np . atleast_1d ( z ) )
1814
+ _data .append (z )
1815
1815
if extra_arrays :
1816
1816
_data .extend (extra_arrays )
1817
1817
elif kind == "matrix" : # turn 2-D arrays into list of vectors
Original file line number Diff line number Diff line change @@ -223,19 +223,19 @@ def text_( # noqa: PLR0912
223
223
kwargs ["F" ] += flag
224
224
# angle is numeric type and font/justify are str type.
225
225
if name == "angle" :
226
- extra_arrays .append (np . atleast_1d ( arg ) )
226
+ extra_arrays .append (arg )
227
227
else :
228
- extra_arrays .append (np .atleast_1d ( np . asarray (arg , dtype = str ) ))
228
+ extra_arrays .append (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.
232
232
if is_nonstr_iter (kwargs .get ("t" )):
233
- extra_arrays .append (np . atleast_1d ( kwargs ["t" ]) )
233
+ extra_arrays .append (kwargs ["t" ])
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 ( np . asarray (text , dtype = str ) )
238
- encoding = _check_encoding ("" .join (text ))
237
+ text = np .asarray (text , dtype = str )
238
+ encoding = _check_encoding ("" .join (text . flatten () ))
239
239
if encoding != "ascii" :
240
240
text = np .vectorize (non_ascii_to_octal , excluded = "encoding" )(
241
241
text , encoding = encoding
You can’t perform that action at this time.
0 commit comments