@@ -388,9 +388,9 @@ def _parse_args(self, *args):
388
388
X , Y , U , V , C = [None ]* 5
389
389
args = list (args )
390
390
if len (args ) == 3 or len (args ) == 5 :
391
- C = ma .asarray (args .pop (- 1 ))
392
- V = ma .asarray (args .pop (- 1 ))
393
- U = ma .asarray (args .pop (- 1 ))
391
+ C = ma .masked_invalid (args .pop (- 1 ), copy = False )
392
+ V = ma .masked_invalid (args .pop (- 1 ), copy = False )
393
+ U = ma .masked_invalid (args .pop (- 1 ), copy = False )
394
394
if U .ndim == 1 :
395
395
nr , nc = 1 , U .shape [0 ]
396
396
else :
@@ -483,7 +483,8 @@ def _make_verts(self, U, V):
483
483
elif self .angles == 'uv' :
484
484
theta = np .angle (uv .filled (0 ))
485
485
else :
486
- theta = ma .asarray (self .angles ).filled (0 )* np .pi / 180.0
486
+ theta = ma .masked_invalid (self .angles , copy = False ).filled (0 )
487
+ theta *= (np .pi / 180.0 )
487
488
theta .shape = (theta .shape [0 ], 1 ) # for broadcasting
488
489
xy = (X + Y * 1j ) * np .exp (1j * theta )* self .width
489
490
xy = xy [:,:,np .newaxis ]
@@ -919,9 +920,9 @@ def _parse_args(self, *args):
919
920
X , Y , U , V , C = [None ]* 5
920
921
args = list (args )
921
922
if len (args ) == 3 or len (args ) == 5 :
922
- C = ma .asarray (args .pop (- 1 )).ravel ()
923
- V = ma .asarray (args .pop (- 1 ))
924
- U = ma .asarray (args .pop (- 1 ))
923
+ C = ma .masked_invalid (args .pop (- 1 ), copy = False ).ravel ()
924
+ V = ma .masked_invalid (args .pop (- 1 ), copy = False )
925
+ U = ma .masked_invalid (args .pop (- 1 ), copy = False )
925
926
nn = np .shape (U )
926
927
nc = nn [0 ]
927
928
nr = 1
@@ -937,10 +938,10 @@ def _parse_args(self, *args):
937
938
return X , Y , U , V , C
938
939
939
940
def set_UVC (self , U , V , C = None ):
940
- self .u = ma .asarray ( U ).ravel ()
941
- self .v = ma .asarray ( V ).ravel ()
941
+ self .u = ma .masked_invalid ( U , copy = False ).ravel ()
942
+ self .v = ma .masked_invalid ( V , copy = False ).ravel ()
942
943
if C is not None :
943
- c = ma .asarray ( C ).ravel ()
944
+ c = ma .masked_invalid ( C , copy = False ).ravel ()
944
945
x ,y ,u ,v ,c = delete_masked_points (self .x .ravel (), self .y .ravel (),
945
946
self .u , self .v , c )
946
947
else :
0 commit comments