μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Private Member Functions | List of all members
array_t< T, ExtraFlags > Class Template Reference

#include </builds/ipbus/ipbus-software/uhal/python/pybind11-python2/include/pybind11/numpy.h>

Inheritance diagram for array_t< T, ExtraFlags >:
[legend]
Collaboration diagram for array_t< T, ExtraFlags >:
[legend]

Classes

struct  private_ctor
 

Public Types

using value_type = T
 
using value_type = T
 
- Public Types inherited from array
enum  { c_style = detail::npy_api::NPY_ARRAY_C_CONTIGUOUS_ , f_style = detail::npy_api::NPY_ARRAY_F_CONTIGUOUS_ , forcecast = detail::npy_api::NPY_ARRAY_FORCECAST_ }
 
enum  { c_style = detail::npy_api::NPY_ARRAY_C_CONTIGUOUS_ , f_style = detail::npy_api::NPY_ARRAY_F_CONTIGUOUS_ , forcecast = detail::npy_api::NPY_ARRAY_FORCECAST_ }
 
using ShapeContainer = detail::any_container< ssize_t >
 
using StridesContainer = detail::any_container< ssize_t >
 
using ShapeContainer = detail::any_container< ssize_t >
 
using StridesContainer = detail::any_container< ssize_t >
 

Public Member Functions

 array_t ()
 
 array_t (handle h, borrowed_t)
 
 array_t (handle h, stolen_t)
 
 array_t (handle h, bool is_borrowed)
 
 array_t (const object &o)
 
 array_t (const buffer_info &info, handle base=handle())
 
 array_t (ShapeContainer shape, StridesContainer strides, const T *ptr=nullptr, handle base=handle())
 
 array_t (ShapeContainer shape, const T *ptr=nullptr, handle base=handle())
 
 array_t (ssize_t count, const T *ptr=nullptr, handle base=handle())
 
constexpr ssize_t itemsize () const
 
template<typename... Ix>
ssize_t index_at (Ix... index) const
 
template<typename... Ix>
const T * data (Ix... index) const
 
template<typename... Ix>
T * mutable_data (Ix... index)
 
template<typename... Ix>
const T & at (Ix... index) const
 
template<typename... Ix>
T & mutable_at (Ix... index)
 
template<ssize_t Dims = -1>
detail::unchecked_mutable_reference< T, Dims > mutable_unchecked () &
 Returns a proxy object that provides access to the array's data without bounds or dimensionality checking. More...
 
template<ssize_t Dims = -1>
detail::unchecked_reference< T, Dims > unchecked () const &
 Returns a proxy object that provides const access to the array's data without bounds or dimensionality checking. More...
 
 array_t ()
 
 array_t (handle h, borrowed_t)
 
 array_t (handle h, stolen_t)
 
 array_t (handle h, bool is_borrowed)
 
 array_t (const object &o)
 
 array_t (const buffer_info &info, handle base=handle())
 
 array_t (ShapeContainer shape, StridesContainer strides, const T *ptr=nullptr, handle base=handle())
 
 array_t (ShapeContainer shape, const T *ptr=nullptr, handle base=handle())
 
 array_t (ssize_t count, const T *ptr=nullptr, handle base=handle())
 
constexpr ssize_t itemsize () const
 
template<typename... Ix>
ssize_t index_at (Ix... index) const
 
template<typename... Ix>
const T * data (Ix... index) const
 
template<typename... Ix>
T * mutable_data (Ix... index)
 
template<typename... Ix>
const T & at (Ix... index) const
 
template<typename... Ix>
T & mutable_at (Ix... index)
 
template<ssize_t Dims = -1>
detail::unchecked_mutable_reference< T, Dims > mutable_unchecked () &
 Returns a proxy object that provides access to the array's data without bounds or dimensionality checking. More...
 
template<ssize_t Dims = -1>
detail::unchecked_reference< T, Dims > unchecked () const &
 Returns a proxy object that provides const access to the array's data without bounds or dimensionality checking. More...
 
- Public Member Functions inherited from array
 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())
 
pybind11::dtype dtype () const
 Array descriptor (dtype) More...
 
ssize_t size () const
 Total number of elements. More...
 
ssize_t itemsize () const
 Byte size of a single element. More...
 
ssize_t nbytes () const
 Total number of bytes. More...
 
ssize_t ndim () const
 Number of dimensions. More...
 
object base () const
 Base object. More...
 
const ssize_tshape () const
 Dimensions of the array. More...
 
ssize_t shape (ssize_t dim) const
 Dimension along a given axis. More...
 
const ssize_tstrides () const
 Strides of the array. More...
 
ssize_t strides (ssize_t dim) const
 Stride along a given axis. More...
 
int flags () const
 Return the NumPy array flags. More...
 
bool writeable () const
 If set, the array is writeable (otherwise the buffer is read-only) More...
 
bool owndata () const
 If set, the array owns the data (will be freed when the array is deleted) More...
 
template<typename... Ix>
const void * data (Ix... index) const
 Pointer to the contained data. More...
 
template<typename... Ix>
void * mutable_data (Ix... index)
 Mutable pointer to the contained data. More...
 
template<typename... Ix>
ssize_t offset_at (Ix... index) const
 Byte offset from beginning of the array to a given index (full or partial). More...
 
ssize_t offset_at () const
 
template<typename... Ix>
ssize_t index_at (Ix... index) const
 Item count from beginning of the array to a given index (full or partial). More...
 
template<typename T , ssize_t Dims = -1>
detail::unchecked_mutable_reference< T, Dims > mutable_unchecked () &
 Returns a proxy object that provides access to the array's data without bounds or dimensionality checking. More...
 
template<typename T , ssize_t Dims = -1>
detail::unchecked_reference< T, Dims > unchecked () const &
 Returns a proxy object that provides const access to the array's data without bounds or dimensionality checking. More...
 
array squeeze ()
 Return a new view with all of the dimensions of length 1 removed. More...
 
void resize (ShapeContainer new_shape, bool refcheck=true)
 Resize array to given shape If refcheck is true and more that one reference exist to this array then resize will succeed only if it makes a reshape, i.e. More...
 
array reshape (ShapeContainer new_shape)
 Optional order parameter omitted, to be added as needed. More...
 
array view (const std::string &dtype)
 Create a view of an array in a different data type. More...
 
 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())
 
pybind11::dtype dtype () const
 Array descriptor (dtype) More...
 
ssize_t size () const
 Total number of elements. More...
 
ssize_t itemsize () const
 Byte size of a single element. More...
 
ssize_t nbytes () const
 Total number of bytes. More...
 
ssize_t ndim () const
 Number of dimensions. More...
 
object base () const
 Base object. More...
 
const ssize_tshape () const
 Dimensions of the array. More...
 
ssize_t shape (ssize_t dim) const
 Dimension along a given axis. More...
 
const ssize_tstrides () const
 Strides of the array. More...
 
ssize_t strides (ssize_t dim) const
 Stride along a given axis. More...
 
int flags () const
 Return the NumPy array flags. More...
 
bool writeable () const
 If set, the array is writeable (otherwise the buffer is read-only) More...
 
bool owndata () const
 If set, the array owns the data (will be freed when the array is deleted) More...
 
template<typename... Ix>
const void * data (Ix... index) const
 Pointer to the contained data. More...
 
template<typename... Ix>
void * mutable_data (Ix... index)
 Mutable pointer to the contained data. More...
 
template<typename... Ix>
ssize_t offset_at (Ix... index) const
 Byte offset from beginning of the array to a given index (full or partial). More...
 
ssize_t offset_at () const
 
template<typename... Ix>
ssize_t index_at (Ix... index) const
 Item count from beginning of the array to a given index (full or partial). More...
 
template<typename T , ssize_t Dims = -1>
detail::unchecked_mutable_reference< T, Dims > mutable_unchecked () &
 Returns a proxy object that provides access to the array's data without bounds or dimensionality checking. More...
 
template<typename T , ssize_t Dims = -1>
detail::unchecked_reference< T, Dims > unchecked () const &
 Returns a proxy object that provides const access to the array's data without bounds or dimensionality checking. More...
 
array squeeze ()
 Return a new view with all of the dimensions of length 1 removed. More...
 
void resize (ShapeContainer new_shape, bool refcheck=true)
 Resize array to given shape If refcheck is true and more that one reference exist to this array then resize will succeed only if it makes a reshape, i.e. More...
 
array reshape (ShapeContainer new_shape)
 Optional order parameter omitted, to be added as needed. More...
 
array view (const std::string &dtype)
 Create a view of an array in a different data type. More...
 
- Public Member Functions inherited from buffer
buffer_info request (bool writable=false) const
 
buffer_info request (bool writable=false) const
 
- Public Member Functions inherited from object
 object ()=default
 
 PYBIND11_DEPRECATED ("Use reinterpret_borrow<object>() or reinterpret_steal<object>()") object(handle h
 
 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 ()
 Destructor; automatically calls handle::dec_ref() More...
 
handle release ()
 \rst Resets the internal pointer to nullptr without decreasing the object's reference count. More...
 
objectoperator= (const object &other)
 
objectoperator= (object &&other) noexcept
 
template<typename T >
cast () const &
 
template<typename T >
cast () &&
 
 object (handle h, borrowed_t)
 
 object (handle h, stolen_t)
 
 object ()=default
 
 PYBIND11_DEPRECATED ("Use reinterpret_borrow<object>() or reinterpret_steal<object>()") object(handle h
 
 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 ()
 Destructor; automatically calls handle::dec_ref() More...
 
handle release ()
 \rst Resets the internal pointer to nullptr without decreasing the object's reference count. More...
 
objectoperator= (const object &other)
 
objectoperator= (object &&other) noexcept
 
template<typename T >
cast () const &
 
template<typename T >
cast () &&
 
 object (handle h, borrowed_t)
 
 object (handle h, stolen_t)
 
template<typename T >
cast () const &
 
template<typename T >
cast () &&
 
template<>
void cast () const &
 
template<>
void cast () &&
 
- Public Member Functions inherited from handle
 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...
 
PyObject * ptr () const
 Return the underlying PyObject * pointer. More...
 
PyObject *& ptr ()
 
const handleinc_ref () const &
 \rst Manually increase the reference count of the Python object. More...
 
const handledec_ref () const &
 \rst Manually decrease the reference count of the Python object. More...
 
template<typename T >
cast () const
 \rst Attempt to cast the Python object into the given C++ type. More...
 
 operator bool () const
 Return true when the handle wraps a valid Python object. More...
 
bool operator== (const handle &h) const
 \rst Deprecated: Check that the underlying pointers are the same. More...
 
bool operator!= (const handle &h) const
 
bool check () const
 
 handle ()=default
 The default constructor creates a handle with a nullptr-valued pointer. More...
 
template<typename T , detail::enable_if_t< detail::is_pyobj_ptr_or_nullptr_t< T >::value, int > = 0>
 handle (T ptr)
 Enable implicit conversion from PyObject * and nullptr. More...
 
template<typename T , detail::enable_if_t< detail::all_of< detail::none_of< std::is_base_of< handle, T >, detail::is_pyobj_ptr_or_nullptr_t< T > >, std::is_convertible< T, PyObject * > >::value, int > = 0>
 handle (T &obj)
 Enable implicit conversion through T::operator PyObject *(). More...
 
PyObject * ptr () const
 Return the underlying PyObject * pointer. More...
 
PyObject *& ptr ()
 
const handleinc_ref () const &
 \rst Manually increase the reference count of the Python object. More...
 
const handledec_ref () const &
 \rst Manually decrease the reference count of the Python object. More...
 
template<typename T >
cast () const
 \rst Attempt to cast the Python object into the given C++ type. More...
 
 operator bool () const
 Return true when the handle wraps a valid Python object. More...
 
bool operator== (const handle &h) const
 \rst Deprecated: Check that the underlying pointers are the same. More...
 
bool operator!= (const handle &h) const
 
bool check () const
 
template<>
void cast () const
 

Static Public Member Functions

static array_t ensure (handle h)
 Ensure that the argument is a NumPy array of the correct dtype (and if not, try to convert it). More...
 
static bool check_ (handle h)
 
static array_t ensure (handle h)
 Ensure that the argument is a NumPy array of the correct dtype (and if not, try to convert it). More...
 
static bool check_ (handle h)
 
- Static Public Member Functions inherited from array
static array ensure (handle h, int ExtraFlags=0)
 Ensure that the argument is a NumPy array In case of an error, nullptr is returned and the Python error is cleared. More...
 
static array ensure (handle h, int ExtraFlags=0)
 Ensure that the argument is a NumPy array In case of an error, nullptr is returned and the Python error is cleared. More...
 
- Static Public Member Functions inherited from handle
static std::size_t inc_ref_counter ()
 

Static Protected Member Functions

static PyObject * raw_array_t (PyObject *ptr)
 Create array from any object – always returns a new reference. More...
 
static PyObject * raw_array_t (PyObject *ptr)
 Create array from any object – always returns a new reference. More...
 
- Static Protected Member Functions inherited from array
static PyObject * raw_array (PyObject *ptr, int ExtraFlags=0)
 Create array from any object – always returns a new reference. More...
 
static PyObject * raw_array (PyObject *ptr, int ExtraFlags=0)
 Create array from any object – always returns a new reference. More...
 

Private Member Functions

 array_t (private_ctor, ShapeContainer &&shape, StridesContainer &&strides, const T *ptr, handle base)
 
 array_t (private_ctor, ShapeContainer &&shape, StridesContainer &&strides, const T *ptr, handle base)
 

Additional Inherited Members

- Public Attributes inherited from object
bool is_borrowed: handle(h) { if (is_borrowed) { inc_ref()
 
- Protected Member Functions inherited from array
void fail_dim_check (ssize_t dim, const std::string &msg) const
 
template<typename... Ix>
ssize_t byte_offset (Ix... index) const
 
void check_writeable () const
 
template<typename... Ix>
void check_dimensions (Ix... index) const
 
void check_dimensions_impl (ssize_t, const ssize_t *) const
 
template<typename... Ix>
void check_dimensions_impl (ssize_t axis, const ssize_t *shape, ssize_t i, Ix... index) const
 
void fail_dim_check (ssize_t dim, const std::string &msg) const
 
template<typename... Ix>
ssize_t byte_offset (Ix... index) const
 
void check_writeable () const
 
template<typename... Ix>
void check_dimensions (Ix... index) const
 
void check_dimensions_impl (ssize_t, const ssize_t *) const
 
template<typename... Ix>
void check_dimensions_impl (ssize_t axis, const ssize_t *shape, ssize_t i, Ix... index) const
 
- Protected Attributes inherited from handle
PyObject * m_ptr = nullptr
 

Detailed Description

template<typename T, int ExtraFlags = array::forcecast>
class array_t< T, ExtraFlags >

Definition at line 991 of file numpy.h.

Member Typedef Documentation

◆ value_type [1/2]

template<typename T , int ExtraFlags = array::forcecast>
using array_t< T, ExtraFlags >::value_type = T

Definition at line 1005 of file numpy.h.

◆ value_type [2/2]

template<typename T , int ExtraFlags = array::forcecast>
using array_t< T, ExtraFlags >::value_type = T

Definition at line 1032 of file numpy.h.

Constructor & Destructor Documentation

◆ array_t() [1/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( private_ctor  ,
ShapeContainer &&  shape,
StridesContainer &&  strides,
const T *  ptr,
handle  base 
)
inlineprivate

Definition at line 995 of file numpy.h.

◆ array_t() [2/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( )
inline

Definition at line 1007 of file numpy.h.

◆ array_t() [3/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( handle  h,
borrowed_t   
)
inline

Definition at line 1008 of file numpy.h.

◆ array_t() [4/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( handle  h,
stolen_t   
)
inline

Definition at line 1009 of file numpy.h.

◆ array_t() [5/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( handle  h,
bool  is_borrowed 
)
inline

Definition at line 1012 of file numpy.h.

◆ array_t() [6/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( const object o)
inline

Definition at line 1022 of file numpy.h.

References handle::m_ptr.

◆ array_t() [7/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( const buffer_info info,
handle  base = handle() 
)
inlineexplicit

Definition at line 1028 of file numpy.h.

◆ array_t() [8/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( ShapeContainer  shape,
StridesContainer  strides,
const T *  ptr = nullptr,
handle  base = handle() 
)
inline

Definition at line 1030 of file numpy.h.

◆ array_t() [9/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( ShapeContainer  shape,
const T *  ptr = nullptr,
handle  base = handle() 
)
inlineexplicit

Definition at line 1036 of file numpy.h.

◆ array_t() [10/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( ssize_t  count,
const T *  ptr = nullptr,
handle  base = handle() 
)
inlineexplicit

Definition at line 1044 of file numpy.h.

◆ array_t() [11/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( private_ctor  ,
ShapeContainer &&  shape,
StridesContainer &&  strides,
const T *  ptr,
handle  base 
)
inlineprivate

Definition at line 1022 of file numpy.h.

◆ array_t() [12/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( )
inline

Definition at line 1034 of file numpy.h.

◆ array_t() [13/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( handle  h,
borrowed_t   
)
inline

Definition at line 1035 of file numpy.h.

◆ array_t() [14/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( handle  h,
stolen_t   
)
inline

Definition at line 1036 of file numpy.h.

◆ array_t() [15/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( handle  h,
bool  is_borrowed 
)
inline

Definition at line 1039 of file numpy.h.

◆ array_t() [16/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( const object o)
inline

Definition at line 1049 of file numpy.h.

References handle::m_ptr.

◆ array_t() [17/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( const buffer_info info,
handle  base = handle() 
)
inlineexplicit

Definition at line 1055 of file numpy.h.

◆ array_t() [18/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( ShapeContainer  shape,
StridesContainer  strides,
const T *  ptr = nullptr,
handle  base = handle() 
)
inline

Definition at line 1057 of file numpy.h.

◆ array_t() [19/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( ShapeContainer  shape,
const T *  ptr = nullptr,
handle  base = handle() 
)
inlineexplicit

Definition at line 1063 of file numpy.h.

◆ array_t() [20/20]

template<typename T , int ExtraFlags = array::forcecast>
array_t< T, ExtraFlags >::array_t ( ssize_t  count,
const T *  ptr = nullptr,
handle  base = handle() 
)
inlineexplicit

Definition at line 1071 of file numpy.h.

Member Function Documentation

◆ at() [1/2]

template<typename T , int ExtraFlags = array::forcecast>
template<typename... Ix>
const T & array_t< T, ExtraFlags >::at ( Ix...  index) const
inline

◆ at() [2/2]

template<typename T , int ExtraFlags = array::forcecast>
template<typename... Ix>
const T & array_t< T, ExtraFlags >::at ( Ix...  index) const
inline

◆ check_() [1/2]

template<typename T , int ExtraFlags = array::forcecast>
static bool array_t< T, ExtraFlags >::check_ ( handle  h)
inlinestatic

Definition at line 1117 of file numpy.h.

References array::c_style, array::f_style, and handle::ptr().

◆ check_() [2/2]

template<typename T , int ExtraFlags = array::forcecast>
static bool array_t< T, ExtraFlags >::check_ ( handle  h)
inlinestatic

Definition at line 1144 of file numpy.h.

References array::c_style, array::f_style, and handle::ptr().

◆ data() [1/2]

template<typename T , int ExtraFlags = array::forcecast>
template<typename... Ix>
const T * array_t< T, ExtraFlags >::data ( Ix...  index) const
inline

◆ data() [2/2]

template<typename T , int ExtraFlags = array::forcecast>
template<typename... Ix>
const T * array_t< T, ExtraFlags >::data ( Ix...  index) const
inline

Definition at line 1082 of file numpy.h.

References array::data().

◆ ensure() [1/2]

template<typename T , int ExtraFlags = array::forcecast>
static array_t array_t< T, ExtraFlags >::ensure ( handle  h)
inlinestatic

Ensure that the argument is a NumPy array of the correct dtype (and if not, try to convert it).

In case of an error, nullptr is returned and the Python error is cleared.

Definition at line 1109 of file numpy.h.

References handle::ptr(), and array_t< T, ExtraFlags >::raw_array_t().

◆ ensure() [2/2]

template<typename T , int ExtraFlags = array::forcecast>
static array_t array_t< T, ExtraFlags >::ensure ( handle  h)
inlinestatic

Ensure that the argument is a NumPy array of the correct dtype (and if not, try to convert it).

In case of an error, nullptr is returned and the Python error is cleared.

Definition at line 1136 of file numpy.h.

References handle::ptr(), and array_t< T, ExtraFlags >::raw_array_t().

◆ index_at() [1/2]

template<typename T , int ExtraFlags = array::forcecast>
template<typename... Ix>
ssize_t array_t< T, ExtraFlags >::index_at ( Ix...  index) const
inline

Definition at line 1050 of file numpy.h.

References array_t< T, ExtraFlags >::itemsize(), and array::offset_at().

◆ index_at() [2/2]

template<typename T , int ExtraFlags = array::forcecast>
template<typename... Ix>
ssize_t array_t< T, ExtraFlags >::index_at ( Ix...  index) const
inline

Definition at line 1077 of file numpy.h.

References array_t< T, ExtraFlags >::itemsize(), and array::offset_at().

◆ itemsize() [1/2]

template<typename T , int ExtraFlags = array::forcecast>
constexpr ssize_t array_t< T, ExtraFlags >::itemsize ( ) const
inlineconstexpr

◆ itemsize() [2/2]

template<typename T , int ExtraFlags = array::forcecast>
constexpr ssize_t array_t< T, ExtraFlags >::itemsize ( ) const
inlineconstexpr

Definition at line 1074 of file numpy.h.

◆ mutable_at() [1/2]

template<typename T , int ExtraFlags = array::forcecast>
template<typename... Ix>
T & array_t< T, ExtraFlags >::mutable_at ( Ix...  index)
inline

◆ mutable_at() [2/2]

template<typename T , int ExtraFlags = array::forcecast>
template<typename... Ix>
T & array_t< T, ExtraFlags >::mutable_at ( Ix...  index)
inline

◆ mutable_data() [1/2]

template<typename T , int ExtraFlags = array::forcecast>
template<typename... Ix>
T * array_t< T, ExtraFlags >::mutable_data ( Ix...  index)
inline

◆ mutable_data() [2/2]

template<typename T , int ExtraFlags = array::forcecast>
template<typename... Ix>
T * array_t< T, ExtraFlags >::mutable_data ( Ix...  index)
inline

Definition at line 1087 of file numpy.h.

References array::mutable_data().

◆ mutable_unchecked() [1/2]

template<typename T , int ExtraFlags = array::forcecast>
template<ssize_t Dims = -1>
detail::unchecked_mutable_reference< T, Dims > array_t< T, ExtraFlags >::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 1091 of file numpy.h.

◆ mutable_unchecked() [2/2]

template<typename T , int ExtraFlags = array::forcecast>
template<ssize_t Dims = -1>
detail::unchecked_mutable_reference< T, Dims > array_t< T, ExtraFlags >::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 1118 of file numpy.h.

◆ raw_array_t() [1/2]

template<typename T , int ExtraFlags = array::forcecast>
static PyObject * array_t< T, ExtraFlags >::raw_array_t ( PyObject *  ptr)
inlinestaticprotected

Create array from any object – always returns a new reference.

Definition at line 1127 of file numpy.h.

References handle::ptr(), and object::release().

Referenced by array_t< T, ExtraFlags >::ensure().

◆ raw_array_t() [2/2]

template<typename T , int ExtraFlags = array::forcecast>
static PyObject * array_t< T, ExtraFlags >::raw_array_t ( PyObject *  ptr)
inlinestaticprotected

Create array from any object – always returns a new reference.

Definition at line 1154 of file numpy.h.

References handle::ptr(), and object::release().

◆ unchecked() [1/2]

template<typename T , int ExtraFlags = array::forcecast>
template<ssize_t Dims = -1>
detail::unchecked_reference< T, Dims > array_t< T, ExtraFlags >::unchecked ( ) const &
inline

Returns a proxy object that provides const access to the array's data without bounds or dimensionality checking.

Unlike 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 1103 of file numpy.h.

◆ unchecked() [2/2]

template<typename T , int ExtraFlags = array::forcecast>
template<ssize_t Dims = -1>
detail::unchecked_reference< T, Dims > array_t< T, ExtraFlags >::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 1130 of file numpy.h.


The documentation for this class was generated from the following files: