@@ -1106,40 +1106,10 @@ def _flat_size(subary: ArrayOrContainerOrScalar) -> Array | int | np.integer:
11061106 size = _flat_size (ary )
11071107 return size , common_dtype
11081108
1109- # }}}
11101109
11111110class _HasOuterBcastTypes (Protocol ):
11121111 _outer_bcast_types : ClassVar [Collection [type ]]
11131112
1114- # {{{ numpy conversion
1115-
1116- def from_numpy (
1117- ary : np .ndarray | ScalarLike ,
1118- actx : ArrayContext ) -> ArrayOrContainerOrScalar :
1119- """Convert all :mod:`numpy` arrays in the :class:`~arraycontext.ArrayContainer`
1120- to the base array type of :class:`~arraycontext.ArrayContext`.
1121-
1122- The conversion is done using :meth:`arraycontext.ArrayContext.from_numpy`.
1123- """
1124- warn ("Calling from_numpy(ary, actx) is deprecated, call actx.from_numpy(ary)"
1125- " instead. This will stop working in 2023." ,
1126- DeprecationWarning , stacklevel = 2 )
1127-
1128- return actx .from_numpy (ary )
1129-
1130-
1131- def to_numpy (ary : ArrayOrContainer , actx : ArrayContext ) -> ArrayOrContainer :
1132- """Convert all arrays in the :class:`~arraycontext.ArrayContainer` to
1133- :mod:`numpy` using the provided :class:`~arraycontext.ArrayContext` *actx*.
1134-
1135- The conversion is done using :meth:`arraycontext.ArrayContext.to_numpy`.
1136- """
1137- warn ("Calling to_numpy(ary, actx) is deprecated, call actx.to_numpy(ary)"
1138- " instead. This will stop working in 2023." ,
1139- DeprecationWarning , stacklevel = 2 )
1140-
1141- return actx .to_numpy (ary )
1142-
11431113# }}}
11441114
11451115
0 commit comments