Search
Search Results
Search finished, found 28 page(s) matching the search query.
- Indexing routines
...NumPy reference Routines and objects by topic Indexing routines...
- Array iterator API
...is used, and this operand is buffered, this changes how data is copied from the buffer into the array. A masked copying routine is used, which only copies the elements in the buffer for which writemasked returns true from the corresponding...
- Indexing on
ndarrays
...Indexing on ndarrays See also Indexing routines ndarrays can be indexed using the standard Python x[obj] syntax, where x is the array and obj the selection. T...
- Indexing routines
...NumPy reference Routines and objects by topic Indexing routines...
- Internal organization of NumPy arrays
...aches to consider: 1) accept that the first index is just not the most rapidly changing in memory and have all your I/O routines reorder your data when going from memory to disk or visa versa, or use NumPy’s mechanism for mapping the first...
- NumPy 1.13.0 Release Notes
...r to override the behavior of NumPy’s ufuncs. This works quite similarly to Python’s __mul__ and other binary operation routines. See the documentation for a more detailed description of the implementation and behavior of this new option. T...
- NumPy C code explanations
...ured array field setting works more naturally (a[0]['f1'] = value). Indexing See also Indexing on ndarrays, Indexing routines All Python indexing operations arr[index] are organized by first preparing the index and finding the index typ...
- NumPy quickstart
...print(element) ... 0 1 2 3 10 11 12 13 20 21 22 23 30 31 32 33 40 41 42 43 See also Indexing on ndarrays, Indexing routines (reference), newaxis, ndenumerate, indices Shape manipulation Changing the shape of an array An array has...
- NumPy: the absolute basics for beginners
...# may vary Read more about creating arrays, filled with 0’s, 1’s, other values or uninitialized, at array creation routines. Generating random numbers The use of random number generation is an important part of the configuration and...
- Routines and objects by topic
...NumPy reference Routines and objects by topic...
- Scalars
...rray priority. generic.__array_wrap__ __array_wrap__ implementation for scalar types Indexing See also Indexing routines, Data type objects (dtype) Array scalars can be indexed like 0-dimensional arrays: if x is an array scalar, x...
- Signature file
...[<usercode statement>]... [ interface <usercode statement> <Fortran block data signatures> <Fortran/C routine signatures> end [interface] ]... [ interface module <F90 modulename> [<F90 module data type de...
- Structured arrays
...numpy.rec module provides a number of other convenience functions for creating record arrays, see record array creation routines. A record array representation of a structured array can be obtained using the appropriate view: >>> arr = np.a...
- The N-dimensional array (
ndarray
)...>>> x array([[1, 9, 3], [4, 5, 6]], dtype=int32) Constructing arrays New arrays can be constructed using the routines detailed in Array creation routines, and also by using the low-level ndarray constructor: ndarray(shape[, dty...
- Array API
...if the array was created using slicing or some other operation where a clearly-distinguishable parent is present). This routine can do anything it wants to. It should return a -1 on error and 0 otherwise. Data access These functions and...
- Array creation
...Array creation See also Array creation routines Introduction There are 6 general mechanisms for creating arrays: Conversion from other Python structures (i....
- Beyond the basics
...work either if you pass this object back to Python — so you shouldn’t do this). Note that the returned object from this routine is still usually cast to PyArrayIterObject *. All that’s been done is to modify the strides and dimensions of th...
- F2PY examples
...g. F2PY walkthrough: a basic extension module Creating source for a basic extension module Consider the following subroutine, contained in a file named add.f C SUBROUTINE ZADD(A,B,C,N) C DOUBLE COMPLEX A(*) DOUBLE COMPL...
- F2PY test suite
...ise depend on a compiler need to call compiler_check_f2pycli() instead of f2pycli(). Example Consider the following subroutines, contained in a file named add-test.f subroutine addb(k) real(8), intent(inout) :: k(:)...
- Glossary
...s a choice which function gets applied. The general term for the function is ufunc, short for universal function. NumPy routines have built-in ufuncs, but users can also write their own. vectorizationNumPy hands off array processing to C,...
- NumPy 1.16.0 Release Notes
..._matmul__ operator can now be overridden by __array_ufunc__. Its implementation has also changed. It uses the same BLAS routines as numpy.dot, ensuring its performance is similar for large matrices. Start and stop arrays for linspace, log...
- NumPy 1.6.0 Release Notes
...the domain. Fortran assumed shape array and size function support in numpy.f2py F2py now supports wrapping Fortran 90 routines that use assumed shape arrays. Before such routines could be called from Python but the corresponding Fortran...
- NumPy 2.0.0 Release Notes
...or users of f2py only as a code generator, i.e. without -c. (gh-24532) bind(c) support for f2py Both functions and subroutines can be annotated with bind(c). f2py will handle both the correct type mapping, and preserve the unique label fo...
- NumPy C-API
...Files NumPy provides a C-API to enable users to extend the system and get access to the array object for use in other routines. The best way to truly understand the C-API is to read the source code. If you are unfamiliar with (C) source c...
- NumPy reference
...ay subclasses Masked arrays The array interface protocol Datetimes and timedeltas Universal functions (ufunc) Routines and objects by topic Constants Array creation routines Array manipulation routines Bit-wise operations String f...
- Standard array subclasses
...e any subclass of an ndarray, then asanyarray can be used to allow subclasses to propagate more cleanly through your subroutine. In principal a subclass could redefine any aspect of the array and therefore, under strict guidelines, asanyarr...
- Using Python as glue
...portions of your code). Therefore one of the most common needs is to call out from Python code to a fast, machine-code routine (e.g. compiled using C/C++ or Fortran). The fact that this is relatively easy to do is a big reason why Python i...
- What is NumPy?
...des a multidimensional array object, various derived objects (such as masked arrays and matrices), and an assortment of routines for fast operations on arrays, including mathematical, logical, shape manipulation, sorting, selecting, I/O, di...