|
| array () |
|
| array (const pybind11::dtype &dt, ShapeContainer shape, StridesContainer strides, const void *ptr=nullptr, handle base=handle()) |
|
| array (const pybind11::dtype &dt, ShapeContainer shape, const void *ptr=nullptr, handle base=handle()) |
|
template<typename T , typename = detail::enable_if_t<std::is_integral<T>::value && !std::is_same<bool, T>::value>> |
| array (const pybind11::dtype &dt, T count, const void *ptr=nullptr, handle base=handle()) |
|
template<typename T > |
| array (ShapeContainer shape, StridesContainer strides, const T *ptr, handle base=handle()) |
|
template<typename T > |
| array (ShapeContainer shape, const T *ptr, handle base=handle()) |
|
template<typename T > |
| array (ssize_t count, const T *ptr, handle base=handle()) |
|
| array (const buffer_info &info, handle base=handle()) |
|
object | base () const |
| Base object. More...
|
|
template<typename... Ix> |
const void * | data (Ix...index) const |
|
pybind11::dtype | dtype () const |
| Array descriptor (dtype) More...
|
|
int | flags () const |
| Return the NumPy array flags. More...
|
|
template<typename... Ix> |
ssize_t | index_at (Ix...index) const |
|
ssize_t | itemsize () const |
| Byte size of a single element. More...
|
|
template<typename... Ix> |
void * | mutable_data (Ix...index) |
|
template<typename T , ssize_t Dims = -1> |
detail::unchecked_mutable_reference< T, Dims > | mutable_unchecked ()& |
|
ssize_t | nbytes () const |
| Total number of bytes. More...
|
|
ssize_t | ndim () const |
| Number of dimensions. More...
|
|
template<typename... Ix> |
ssize_t | offset_at (Ix...index) const |
|
ssize_t | offset_at () const |
|
bool | owndata () const |
| If set, the array owns the data (will be freed when the array is deleted) More...
|
|
void | resize (ShapeContainer new_shape, bool refcheck=true) |
|
const ssize_t * | shape () const |
| Dimensions of the array. More...
|
|
ssize_t | shape (ssize_t dim) const |
| Dimension along a given axis. More...
|
|
ssize_t | size () const |
| Total number of elements. More...
|
|
array | squeeze () |
| Return a new view with all of the dimensions of length 1 removed. More...
|
|
const ssize_t * | strides () const |
| Strides of the array. More...
|
|
ssize_t | strides (ssize_t dim) const |
| Stride along a given axis. More...
|
|
template<typename T , ssize_t Dims = -1> |
detail::unchecked_reference< T, Dims > | unchecked () const & |
|
bool | writeable () const |
| If set, the array is writeable (otherwise the buffer is read-only) More...
|
|
buffer_info | request (bool writable=false) const |
|
template<typename T > |
T | cast () const & |
|
template<typename T > |
T | cast ()&& |
|
template<> |
void | cast () const & |
|
template<> |
void | cast ()&& |
|
| object ()=default |
|
| object (const object &o) |
| Copy constructor; always increases the reference count. More...
|
|
| object (object &&other) noexcept |
| Move constructor; steals the object from other and preserves its reference count. More...
|
|
| object (handle h, borrowed_t) |
|
| object (handle h, stolen_t) |
|
object & | operator= (const object &other) |
|
object & | operator= (object &&other) noexcept |
|
| PYBIND11_DEPRECATED ("Use reinterpret_borrow<object>() or reinterpret_steal<object>()") object(handle h |
|
handle | release () |
|
| ~object () |
| Destructor; automatically calls handle::dec_ref() More...
|
|
Public Member Functions inherited from handle |
template<typename T > |
T | cast () const |
|
template<> |
void | cast () const |
|
bool | check () const |
|
const handle & | dec_ref () const & |
|
| handle ()=default |
| The default constructor creates a handle with a nullptr -valued pointer. More...
|
|
| handle (PyObject *ptr) |
| Creates a handle from the given raw Python object pointer. More...
|
|
const handle & | inc_ref () const & |
|
| operator bool () const |
| Return true when the handle wraps a valid Python object. More...
|
|
bool | operator!= (const handle &h) const |
|
bool | operator== (const handle &h) const |
|
PyObject * | ptr () const |
| Return the underlying PyObject * pointer. More...
|
|
PyObject *& | ptr () |
|
Definition at line 543 of file numpy.h.
template<typename T , ssize_t Dims = -1>
detail::unchecked_mutable_reference<T, Dims> array::mutable_unchecked |
( |
| ) |
|
|
inline |
Returns a proxy object that provides access to the array's data without bounds or dimensionality checking. Will throw if the array is missing the writeable
flag. Use with care: the array must not be destroyed or reshaped for the duration of the returned object, and the caller must take care not to access invalid dimensions or dimension indices.
Definition at line 722 of file numpy.h.
template<typename T , ssize_t Dims = -1>
detail::unchecked_reference<T, Dims> array::unchecked |
( |
| ) |
const |
|
inline |
Returns a proxy object that provides const access to the array's data without bounds or dimensionality checking. Unlike mutable_unchecked()
, this does not require that the underlying array have the writable
flag. Use with care: the array must not be destroyed or reshaped for the duration of the returned object, and the caller must take care not to access invalid dimensions or dimension indices.
Definition at line 736 of file numpy.h.