File tree 2 files changed +6
-0
lines changed
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -181,4 +181,7 @@ def _setup_new_guiapp() -> None: ...
181
181
def _format_approx (number : float , precision : int ) -> str : ...
182
182
def _g_sig_digits (value : float , delta : float ) -> int : ...
183
183
def _unikey_or_keysym_to_mplkey (unikey : str , keysym : str ) -> str : ...
184
+ def _is_torch_array (x : Any ) -> bool : ...
185
+ def _is_jax_array (x : Any ) -> bool : ...
186
+ def _unpack_to_numpy (x : Any ) -> Any : ...
184
187
def _auto_format_str (fmt : str , value : Any ) -> str : ...
Original file line number Diff line number Diff line change @@ -948,8 +948,10 @@ def test_unpack_to_numpy_from_torch():
948
948
class Tensor :
949
949
def __init__ (self , data ):
950
950
self .data = data
951
+
951
952
def __array__ (self ):
952
953
return self .data
954
+
953
955
torch = ModuleType ('torch' )
954
956
torch .Tensor = Tensor
955
957
sys .modules ['torch' ] = torch
@@ -967,6 +969,7 @@ def test_unpack_to_numpy_from_jax():
967
969
class Array :
968
970
def __init__ (self , data ):
969
971
self .data = data
972
+
970
973
def __array__ (self ):
971
974
return self .data
972
975
You can’t perform that action at this time.
0 commit comments