Search
Search Results
Search finished, found 65 page(s) matching the search query.
- numpy.ndarray.imag
...NumPy reference Array objects The N-dimensional array (ndarray) numpy.ndarray.imag...
- numpy.ndarray.imag (Python attribute, in numpy.ndarray.imag)
- Array creation
...but for which it is not hard to convert are those formats supported by libraries like PIL (able to read and write many image formats such as jpg, png, etc). Common ASCII formats Delimited files such as comma separated value (csv) and tab...
- How to contribute to the NumPy documentation
...or if you can only come up with a rough draft. Open source is a community effort. Do your best – we’ll help fix issues. Images and real-life data make text more engaging and powerful, but be sure what you use is appropriately licensed and a...
- Indexing on
ndarrays
...life example of where advanced indexing may be useful is for a color lookup table where we want to map the values of an image into RGB triples for display. The lookup table could have a shape (nlookup, 3). Indexing such an array with an ima...
- Internal organization of NumPy arrays
...ng issue. This section will try to explain in detail how NumPy indexing works and why we adopt the convention we do for images, and when it may be appropriate to adopt other conventions. The first thing to understand is that there are two c...
- Memory alignment
.... For example, on a (typical Linux x64 GCC) system, the NumPy complex64 datatype is implemented as struct { float real, imag; }. This has “true” alignment of 4 and “uint” alignment of 8 (equal to the true alignment of uint64). Some cases w...
- NumPy 1.13.0 Release Notes
...et into the file. This is a behaviour change only for offsets greater than mmap.ALLOCATIONGRANULARITY. np.real and np.imag return scalars for scalar inputs Previously, np.real and np.imag used to return array objects when provided a scala...
- NumPy 1.21.1 Release Notes
...ase. #19311: REV,BUG: Replace NotImplemented with typing.Any #19324: MAINT: Fixed the return-dtype of ndarray.real and imag #19330: MAINT: Replace "dtype[Any]" with dtype in the definition of… #19342: DOC: Fix some docstrings that crash pd...
- NumPy 2.0 migration guide
...ns identical to the types used in NumPy 1.x, the API is slightly different, since direct field access (like c.real or c.imag) is no longer possible. It is recommended to use the functions npy_creal and npy_cimag (and the corresponding float...
- NumPy 2.0.0 Release Notes
...directly retrieve or write the real or complex part of the complex number, since direct field access (as in c.real or c.imag) is no longer an option. You can now use utilities provided in numpy/npy_math.h to do these operations, like this:...
- NumPy quickstart
..., argmin, argsort, max, min, ptp, searchsorted, sort Operationschoose, compress, cumprod, cumsum, inner, ndarray.fill, imag, prod, put, putmask, real, sum Basic Statisticscov, mean, std, var Basic Linear Algebracross, dot, outer, linalg....
- numpy.emath.log
...is log are identical, i.e., both return -inf for x = 0, inf for x = inf, and, notably, the complex principle value if x.imag != 0). Examples >>> import numpy as np >>> np.emath.log(np.exp(1)) 1.0 Negative arguments are handled “correctly”...
- numpy.emath.log10
...log10 are identical, i.e., both return -inf for x = 0, inf for x = inf, and, notably, the complex principle value if x.imag != 0). Examples >>> import numpy as np (We set the printing precision so the example can be auto-tested) >>> np.s...
- numpy.emath.log2
...s log2 are identical, i.e., both return -inf for x = 0, inf for x = inf, and, notably, the complex principle value if x.imag != 0). Examples We set the printing precision so the example can be auto-tested: >>> np.set_printoptions(precision=...
- numpy.fft.fft
...In this example, real input has an FFT which is Hermitian, i.e., symmetric in the real part and anti-symmetric in the imaginary part, as described in the numpy.fft documentation: >>> import matplotlib.pyplot as plt >>> t = np.arange(256)...
- numpy.fft.fftn
...andom.uniform(0, 1, X.shape) >>> FS = np.fft.fftn(S) >>> plt.imshow(np.log(np.abs(np.fft.fftshift(FS))**2)) <matplotlib.image.AxesImage object at 0x...> >>> plt.show()...
- numpy.fft.ifft
...>> s = np.fft.ifft(n) >>> plt.plot(t, s.real, label='real') [<matplotlib.lines.Line2D object at ...>] >>> plt.plot(t, s.imag, '--', label='imaginary') [<matplotlib.lines.Line2D object at ...>] >>> plt.legend() <matplotlib.legend.Legend obje...
- numpy.fft.ifftn
...0.+0.j], [0.+0.j, 0.+0.j, 1.+0.j, 0.+0.j], [0.+0.j, 0.+0.j, 0.+0.j, 1.+0.j]]) Create and plot an image with band-limited frequency content: >>> import matplotlib.pyplot as plt >>> n = np.zeros((200,200), dtype=complex...
- numpy.histogram2d
...e array (horizontal). This ensures compatibility with histogramdd. Examples >>> import numpy as np >>> from matplotlib.image import NonUniformImage >>> import matplotlib.pyplot as plt Construct a 2-D histogram with variable bin width. Fi...
- numpy.i: a SWIG interface file for NumPy
...own (essentially equivalent) struct definitions for complex variables: /* Python */ typedef struct {double real; double imag;} Py_complex; /* NumPy */ typedef struct {float real, imag;} npy_cfloat; typedef struct {double real, imag;} npy_...
- numpy.imag
...NumPy reference Routines and objects by topic Mathematical functions numpy.imag...
- numpy.lib.scimath.log
...is log are identical, i.e., both return -inf for x = 0, inf for x = inf, and, notably, the complex principle value if x.imag != 0). Examples >>> import numpy as np >>> np.emath.log(np.exp(1)) 1.0 Negative arguments are handled “correctly”...
- numpy.lib.scimath.log10
- numpy.lib.scimath.log2
...s log2 are identical, i.e., both return -inf for x = 0, inf for x = inf, and, notably, the complex principle value if x.imag != 0). Examples We set the printing precision so the example can be auto-tested: >>> np.set_printoptions(precision=...
- numpy.matrix
- numpy.ndarray
- numpy.ndarray.imag
...NumPy reference Array objects The N-dimensional array (ndarray) numpy.ndarray.imag...
- numpy.polynomial.chebyshev.chebdomain
- numpy.polynomial.chebyshev.chebone
- numpy.polynomial.chebyshev.chebx
- numpy.polynomial.chebyshev.chebzero
- numpy.polynomial.hermite.hermdomain
- numpy.polynomial.hermite.hermone
- numpy.polynomial.hermite.hermx
- numpy.polynomial.hermite.hermzero
- numpy.polynomial.hermite_e.hermedomain
- numpy.polynomial.hermite_e.hermeone
- numpy.polynomial.hermite_e.hermex
- numpy.polynomial.hermite_e.hermezero
- numpy.polynomial.laguerre.lagdomain
- numpy.polynomial.laguerre.lagone
- numpy.polynomial.laguerre.lagx
- numpy.polynomial.laguerre.lagzero
- numpy.polynomial.legendre.legdomain
- numpy.polynomial.legendre.legone
- numpy.polynomial.legendre.legx
- numpy.polynomial.legendre.legzero
- numpy.polynomial.polynomial.polydomain
- numpy.polynomial.polynomial.polyone
- numpy.polynomial.polynomial.polyx
- numpy.polynomial.polynomial.polyzero
- numpy.real
- numpy.real_if_close
- numpy.recarray
- numpy.resize
- numpy.sign
- numpy.trapezoid
- NumPy: the absolute basics for beginners
- The N-dimensional array (
ndarray
) - Using NumPy C-API
- Using Python as glue
- Array API
- Data type objects (
dtype
) - Scalars