Search
Search Results
Search finished, found 13 page(s) matching the search query.
- numpy.generic.__array_wrap__
...NumPy reference Array objects Scalars numpy.generic.__array_wrap__...
- numpy.generic.__array_wrap__ (Python method, in numpy.generic.__array_wrap__)
- Beyond the basics
...This attribute can also be defined by objects that are not sub-types of the ndarray and can be used to determine which __array_wrap__ method should be called for the return output. The __array_wrap__ method ndarray.__array_wrap__ Any...
- Interoperability with NumPy
...mplementation and then convert the return value back into an instance of the foreign object. The __array_finalize__ and __array_wrap__ methods act behind the scenes to ensure that the return type of a NumPy function can be specified as need...
- NumPy 1.4.0 Release Notes
...ay to provide subclasses greater flexibility to interact with ufuncs and ufunc-like functions. ndarray already provided __array_wrap__, which allowed subclasses to set the array type for the result and populate metadata on the way out of th...
- NumPy 2.0.0 Release Notes
...computations for normal ufunc calls (not generalized ufuncs, reductions, etc.). The function was also called instead of __array_wrap__ on the results of some linear algebra functions. It is now removed. If you use it, migrate to __array_ufu...
- NumPy 2.2.0 Release Notes
...s, e.g., due to failing doctests, you can use the print option legacy=2.1 to get the old behaviour. (gh-27482) Calling __array_wrap__ directly on NumPy arrays or scalars now does the right thing when return_scalar is passed (Added in NumPy...
- NumPy C code explanations
...at same class. The mechanism by which this works is the following. If any of the inputs are not ndarrays and define the __array_wrap__ method, then the class with the largest __array_priority__ attribute determines the type of all the outpu...
- numpy.generic.__array_wrap__
...NumPy reference Array objects Scalars numpy.generic.__array_wrap__...
- Standard array subclasses
...-information from the “parent.” Subclasses inherit a default implementation of this method that does nothing. class.__array_wrap__(array, context=None, return_scalar=False) At the end of every ufunc, this method is called on the input o...
- Subclassing ndarray
...use of ndarrays where we need such views, such as copying arrays (c_arr.copy()), creating ufunc output arrays (see also __array_wrap__ for ufuncs and other functions), and reducing methods (like c_arr.mean()). Relationship of view casting...
- Using NumPy C-API
..._array_finalize__ method ndarray.__array_finalize__ The __array_priority__ attribute ndarray.__array_priority__ The __array_wrap__ method ndarray.__array_wrap__...
- Universal functions (
ufunc
) basics