ndarray Derived Type

type, public, extends(object) :: ndarray

Type that represents a Numpy array



Type-Bound Procedures

procedure, public :: destroy => object_destroy

Call to allow for freeing of resources of this object.

  • private subroutine object_destroy(self)

    Arguments

    Type IntentOptional AttributesName
    class(object), intent(inout) :: self

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

  • private function object_getattribute(self, attr, attr_name) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(object), intent(in) :: self
    type(object), intent(out) :: attr
    character(kind=C_CHAR,len=*), intent(in) :: attr_name

    Return Value integer(kind=C_INT)

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

  • private function object_setattr(self, attr_name, attr_value) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(object), intent(inout) :: self
    character(kind=C_CHAR,len=*), intent(in) :: attr_name
    class(object), intent(in) :: attr_value

    Return Value integer(kind=C_INT)

procedure, public :: delattr => object_delattr

Delete an attribute of this object

  • private function object_delattr(self, attr_name) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(object), intent(inout) :: self
    character(kind=C_CHAR,len=*), intent(in) :: attr_name

    Return Value integer(kind=C_INT)

procedure, public :: get_c_ptr => object_get_c_ptr

Get c_ptr representation of this object. For development of Python extension modules

  • private function object_get_c_ptr(self) result(r)

    Get C pointer to an object, needed for developing Python extensions.

    Arguments

    Type IntentOptional AttributesName
    class(object), intent(in) :: self

    Return Value type(c_ptr)

generic, public :: get_data => get_data_int32_1d

Retrieve a Fortran pointer to the array data.

  • private function get_data_int32_1d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    integer(kind=int32), intent(out), dimension(:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_int64_1d

Retrieve a Fortran pointer to the array data.

  • private function get_data_int64_1d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    integer(kind=int64), intent(out), dimension(:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_real32_1d

Retrieve a Fortran pointer to the array data.

  • private function get_data_real32_1d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    real(kind=real32), intent(out), dimension(:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_real64_1d

Retrieve a Fortran pointer to the array data.

  • private function get_data_real64_1d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    real(kind=real64), intent(out), dimension(:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_complex_real32_1d

Retrieve a Fortran pointer to the array data.

  • private function get_data_complex_real32_1d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    complex(kind=real32), intent(out), dimension(:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_complex_real64_1d

Retrieve a Fortran pointer to the array data.

  • private function get_data_complex_real64_1d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    complex(kind=real64), intent(out), dimension(:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_int32_2d

Retrieve a Fortran pointer to the array data.

  • private function get_data_int32_2d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    integer(kind=int32), intent(out), dimension(:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_int64_2d

Retrieve a Fortran pointer to the array data.

  • private function get_data_int64_2d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    integer(kind=int64), intent(out), dimension(:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_real32_2d

Retrieve a Fortran pointer to the array data.

  • private function get_data_real32_2d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    real(kind=real32), intent(out), dimension(:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_real64_2d

Retrieve a Fortran pointer to the array data.

  • private function get_data_real64_2d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    real(kind=real64), intent(out), dimension(:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_complex_real32_2d

Retrieve a Fortran pointer to the array data.

  • private function get_data_complex_real32_2d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    complex(kind=real32), intent(out), dimension(:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_complex_real64_2d

Retrieve a Fortran pointer to the array data.

  • private function get_data_complex_real64_2d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    complex(kind=real64), intent(out), dimension(:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_int32_3d

Retrieve a Fortran pointer to the array data.

  • private function get_data_int32_3d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    integer(kind=int32), intent(out), dimension(:,:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_int64_3d

Retrieve a Fortran pointer to the array data.

  • private function get_data_int64_3d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    integer(kind=int64), intent(out), dimension(:,:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_real32_3d

Retrieve a Fortran pointer to the array data.

  • private function get_data_real32_3d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    real(kind=real32), intent(out), dimension(:,:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_real64_3d

Retrieve a Fortran pointer to the array data.

  • private function get_data_real64_3d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    real(kind=real64), intent(out), dimension(:,:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_complex_real32_3d

Retrieve a Fortran pointer to the array data.

  • private function get_data_complex_real32_3d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    complex(kind=real32), intent(out), dimension(:,:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_complex_real64_3d

Retrieve a Fortran pointer to the array data.

  • private function get_data_complex_real64_3d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    complex(kind=real64), intent(out), dimension(:,:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_int32_4d

Retrieve a Fortran pointer to the array data.

  • private function get_data_int32_4d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    integer(kind=int32), intent(out), dimension(:,:,:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_int64_4d

Retrieve a Fortran pointer to the array data.

  • private function get_data_int64_4d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    integer(kind=int64), intent(out), dimension(:,:,:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_real32_4d

Retrieve a Fortran pointer to the array data.

  • private function get_data_real32_4d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    real(kind=real32), intent(out), dimension(:,:,:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_real64_4d

Retrieve a Fortran pointer to the array data.

  • private function get_data_real64_4d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    real(kind=real64), intent(out), dimension(:,:,:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_complex_real32_4d

Retrieve a Fortran pointer to the array data.

  • private function get_data_complex_real32_4d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    complex(kind=real32), intent(out), dimension(:,:,:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

generic, public :: get_data => get_data_complex_real64_4d

Retrieve a Fortran pointer to the array data.

  • private function get_data_complex_real64_4d(self, ptr, order) result(ierror)

    Get pointer to data of numpy array

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    complex(kind=real64), intent(out), dimension(:,:,:,:), pointer:: ptr

    Pointer to the numerical data of the Fortran array.

    character(kind=C_CHAR), intent(in), optional :: order

    Only retrieve data, when ndarray has certain order.

    If 'F' (default), only retrieve the data when the ndarray has Fortran storage order. If 'C', only retrieve the data when the ndarray has C storage order. ATTENTION: The data, the pointer points to, then will be the transpose of the array. If 'A' accept Fortran or C order. If C, the data will be transposed.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

procedure, public :: transpose => ndarray_transpose

Transpose the array.

  • private function ndarray_transpose(self, transposed_array) result(ierror)

    Return transpose of a ndarray.

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    type(ndarray), intent(out) :: transposed_array

    Return Value integer(kind=C_INT)

procedure, public :: copy => ndarray_copy

Create a copy (with its own data) of the ndarray

  • private function ndarray_copy(self, array_copy, order) result(ierror)

    Returns copy of a ndarray

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    type(ndarray), intent(out) :: array_copy
    character(kind=C_CHAR), intent(in), optional :: order

    Return Value integer(kind=C_INT)

procedure, public :: is_ordered => ndarray_is_ordered

Checks if the array has Fortran or C storage order (contiguous array)

  • private function ndarray_is_ordered(self, order) result(is_ordered)

    Checks if data of ndarray has a specific storage-order.

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    character(kind=C_CHAR), intent(in) :: order

    Return Value logical

procedure, public :: get_dtype_name => ndarray_get_dtype_name

Get numpy.dtype type identifier of the array. Python equivalent: self.dtype.name

  • private function ndarray_get_dtype_name(self, dtype_name) result(ierror)

    Returns type string of ndarray.

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    character(kind=C_CHAR,len=:), intent(out), allocatable:: dtype_name

    Return Value integer(kind=C_INT)

generic, public :: ndim => ndarray_ndim_int32

Get dimension of array

  • private function ndarray_ndim_int32(self, ndim) result(ierror)

    Returns dimensionality of ndarray (ndarray.ndim)

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    integer(kind=int32), intent(out) :: ndim

    Output: dimensionality of array.

    Return Value integer(kind=C_INT)

generic, public :: ndim => ndarray_ndim_int64

Get dimension of array

  • private function ndarray_ndim_int64(self, ndim) result(ierror)

    Returns dimensionality of ndarray (ndarray.ndim)

    Arguments

    Type IntentOptional AttributesName
    class(ndarray), intent(in) :: self
    integer(kind=int64), intent(out) :: ndim

    Output: dimensionality of array.

    Return Value integer(kind=C_INT)