forpy_mod Module

Forpy: A library for Fortran-Python interoperability.

Forpy allows you to use Python features within Fortran ("Python in Fortran") For example: Python modules, datastructures such as list, dict, tuple Furthermore you can write Python (extension) modules in Fortran ("Fortran in Python")



Variables

TypeVisibility AttributesNameInitial
integer(kind=C_INT), public, parameter:: NO_NUMPY_ERROR =2_C_INT
integer(kind=C_INT), public, parameter:: EXCEPTION_ERROR =-1_C_INT
integer(kind=C_INT), public, parameter:: METH_VARARGS =1_C_INT
integer(kind=C_INT), public, parameter:: METH_KEYWORDS =2_C_INT
integer(kind=C_INT), public, parameter:: METH_NOARGS =4_C_INT
integer(kind=C_INT), public, parameter:: METH_O =8_C_INT
integer, public, parameter:: PY_SSIZE_T_KIND =C_INTPTR_T
type(type_py), public, save:: ArithmeticError
type(type_py), public, save:: AssertionError
type(type_py), public, save:: AttributeError
type(type_py), public, save:: BaseException
type(type_py), public, save:: BufferError
type(type_py), public, save:: BytesWarning
type(type_py), public, save:: DeprecationWarning
type(type_py), public, save:: EOFError
type(type_py), public, save:: EnvironmentError
type(type_py), public, save:: Exception
type(type_py), public, save:: FloatingPointError
type(type_py), public, save:: FutureWarning
type(type_py), public, save:: GeneratorExit
type(type_py), public, save:: IOError
type(type_py), public, save:: ImportError
type(type_py), public, save:: ImportWarning
type(type_py), public, save:: IndentationError
type(type_py), public, save:: IndexError
type(type_py), public, save:: KeyError
type(type_py), public, save:: KeyboardInterrupt
type(type_py), public, save:: LookupError
type(type_py), public, save:: MemoryError
type(type_py), public, save:: NameError
type(type_py), public, save:: NotImplementedError
type(type_py), public, save:: OSError
type(type_py), public, save:: OverflowError
type(type_py), public, save:: PendingDeprecationWarning
type(type_py), public, save:: ReferenceError
type(type_py), public, save:: RuntimeError
type(type_py), public, save:: RuntimeWarning
type(type_py), public, save:: StandardError
type(type_py), public, save:: StopIteration
type(type_py), public, save:: SyntaxError
type(type_py), public, save:: SyntaxWarning
type(type_py), public, save:: SystemError
type(type_py), public, save:: SystemExit
type(type_py), public, save:: TabError
type(type_py), public, save:: TypeError
type(type_py), public, save:: UnboundLocalError
type(type_py), public, save:: UnicodeDecodeError
type(type_py), public, save:: UnicodeEncodeError
type(type_py), public, save:: UnicodeError
type(type_py), public, save:: UnicodeTranslateError
type(type_py), public, save:: UnicodeWarning
type(type_py), public, save:: UserWarning
type(type_py), public, save:: ValueError
type(type_py), public, save:: Warning
type(type_py), public, save:: ZeroDivisionError

Interfaces

public interface tuple_create

Creates a tuple with a given number of items.

  • private function tuple_create_int32(r, len) result(ierror)

    Creates a tuple with a given number of elements

    Arguments

    Type IntentOptional AttributesName
    type(tuple), intent(out) :: r

    the freshly created tuple

    integer(kind=int32), intent(in) :: len

    Number of items in tuple

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function tuple_create_int64(r, len) result(ierror)

    Creates a tuple with a given number of elements

    Arguments

    Type IntentOptional AttributesName
    type(tuple), intent(out) :: r

    the freshly created tuple

    integer(kind=int64), intent(in) :: len

    Number of items in tuple

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function tuple_create_object(r, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(tuple), intent(out) :: r

    the created tuple

    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

public interface list_create

Creates a list. Create as empty list or from other object.

  • private function list_create_empty(r) result(ierror)

    Creates an empty list. Python equivalent: r = []

    Arguments

    Type IntentOptional AttributesName
    type(list), intent(out) :: r

    the freshly created empty list

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function list_create_object(r, obj) result(ierror)

    Creates a list from given object if possible. Python equivalent: r = list(obj)

    Arguments

    Type IntentOptional AttributesName
    type(list), intent(out) :: r

    the freshly created list

    class(object), intent(in) :: obj

    object to create list from

    Return Value integer(kind=C_INT)

    Error code, 0 on success

public interface bytes_create

Creates a bytes object from Fortran character string or character array.

  • private function bytes_create_chars(r, string) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(bytes), intent(out) :: r
    character(kind=C_CHAR,len=*), intent(in) :: string

    Return Value integer(kind=C_INT)

  • private function bytes_create_char_1d(r, string) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(bytes), intent(out) :: r
    character(kind=C_CHAR), intent(in), dimension(:):: string

    Return Value integer(kind=C_INT)

public interface str_create

Creates a str object from Fortran character string or character array.

  • private function str_create_chars(r, string) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(str), intent(out) :: r
    character(kind=C_CHAR,len=*), intent(in) :: string

    Return Value integer(kind=C_INT)

  • private function str_create_char_1d(r, string) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(str), intent(out) :: r
    character(kind=C_CHAR), intent(in), dimension(:):: string

    Return Value integer(kind=C_INT)

public interface unicode_create

Creates a unicode string from Fortran character string or character array.

  • private function unicode_create_chars(r, string) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(unicode), intent(out) :: r
    character(kind=C_CHAR,len=*), intent(in) :: string

    Return Value integer(kind=C_INT)

  • private function unicode_create_char_1d(r, string) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(unicode), intent(out) :: r
    character(kind=C_CHAR), intent(in), dimension(:):: string

    Return Value integer(kind=C_INT)

public interface call_py

Interface to call a Python objects (methods or other callables) Arguments (optional) have to be passed as tuple. Keyword arguments (optional) have to be passed as dict.

  • private function call_py_attribute(return_value, obj, attr_name, args, kwargs) result(ierror)

    Calling an object (method, function...) that is a member of another Python object (module,...).

    Arguments

    Type IntentOptional AttributesName
    type(object), intent(out) :: return_value
    class(object), intent(in) :: obj
    character(kind=C_CHAR,len=*), intent(in) :: attr_name
    class(tuple), intent(in), optional :: args
    class(dict), intent(in), optional :: kwargs

    Return Value integer(kind=C_INT)

  • private function call_py_object(return_value, obj_to_call, args, kwargs) result(ierror)

    Calling a Python object (method, function...).

    Arguments

    Type IntentOptional AttributesName
    type(object), intent(out) :: return_value
    class(object), intent(in) :: obj_to_call
    class(tuple), intent(in) :: args
    class(dict), intent(in) :: kwargs

    Return Value integer(kind=C_INT)

  • private function call_py_object_nokwargs(return_value, obj_to_call, args) result(ierror)

    Python equivalent: return_value = obj_to_call(*args)

    Arguments

    Type IntentOptional AttributesName
    type(object), intent(out) :: return_value
    class(object), intent(in) :: obj_to_call
    class(tuple), intent(in) :: args

    Return Value integer(kind=C_INT)

  • private function call_py_object_noargs(return_value, obj_to_call) result(ierror)

    Python equivalent: return_value = obj_to_call()

    Arguments

    Type IntentOptional AttributesName
    type(object), intent(out) :: return_value
    class(object), intent(in) :: obj_to_call

    Return Value integer(kind=C_INT)

  • private function call_py_object_only_kwargs(return_value, obj_to_call, kwargs) result(ierror)

    Python equivalent: return_value = obj_to_call(**kwargs)

    Arguments

    Type IntentOptional AttributesName
    type(object), intent(out) :: return_value
    class(object), intent(in) :: obj_to_call
    class(dict), intent(in) :: kwargs

    Return Value integer(kind=C_INT)

public interface call_py_noret

Interface to call a Python objects (methods or other callables), ignoring the return value. Arguments (optional) have to be passed as tuple. Keyword arguments (optional) have to be passed as dict.

  • private function call_py_noret_attribute(obj, attr_name, args, kwargs) result(ierror)

    Python equivalent: obj.attr_name(args, *kwargs)

    Arguments

    Type IntentOptional AttributesName
    class(object), intent(in) :: obj
    character(kind=C_CHAR,len=*), intent(in) :: attr_name
    class(tuple), intent(in), optional :: args
    class(dict), intent(in), optional :: kwargs

    Return Value integer(kind=C_INT)

  • private function call_py_noret_object(obj_to_call, args, kwargs) result(ierror)

    Python equivalent: obj.attr_name(args, *kwargs)

    Arguments

    Type IntentOptional AttributesName
    class(object), intent(in) :: obj_to_call
    class(tuple), intent(in), optional :: args
    class(dict), intent(in), optional :: kwargs

    Return Value integer(kind=C_INT)

public interface assign_py

Creates a new reference to an object. Python equivalent: lhs = rhs Do not forget to destroy lhs after use.

  • private subroutine assign_py_object(lhs, rhs)

    Equivalent to the following Python code: lhs = rhs

    Arguments

    Type IntentOptional AttributesName
    type(object), intent(out) :: lhs
    class(object), intent(in) :: rhs
  • private subroutine assign_py_list(lhs, rhs)

    Equivalent to the following Python code: lhs = rhs

    Arguments

    Type IntentOptional AttributesName
    type(list), intent(out) :: lhs
    class(list), intent(in) :: rhs
  • private subroutine assign_py_tuple(lhs, rhs)

    Equivalent to the following Python code: lhs = rhs

    Arguments

    Type IntentOptional AttributesName
    type(tuple), intent(out) :: lhs
    class(tuple), intent(in) :: rhs
  • private subroutine assign_py_dict(lhs, rhs)

    Equivalent to the following Python code: lhs = rhs

    Arguments

    Type IntentOptional AttributesName
    type(dict), intent(out) :: lhs
    class(dict), intent(in) :: rhs
  • private subroutine assign_py_ndarray(lhs, rhs)

    Equivalent to the following Python code: lhs = rhs

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: lhs
    class(ndarray), intent(in) :: rhs
  • private subroutine assign_py_type_py(lhs, rhs)

    Equivalent to the following Python code: lhs = rhs

    Arguments

    Type IntentOptional AttributesName
    type(type_py), intent(out) :: lhs
    class(type_py), intent(in) :: rhs
  • private subroutine assign_py_module_py(lhs, rhs)

    Equivalent to the following Python code: lhs = rhs

    Arguments

    Type IntentOptional AttributesName
    type(module_py), intent(out) :: lhs
    class(module_py), intent(in) :: rhs
  • private subroutine assign_py_NoneType(lhs, rhs)

    Equivalent to the following Python code: lhs = rhs

    Arguments

    Type IntentOptional AttributesName
    type(NoneType), intent(out) :: lhs
    class(NoneType), intent(in) :: rhs

public interface ndarray_create

Create a ndarray from a Fortran array. The ndarray will be a copy of the Fortran array.

  • private function ndarray_create_int32_1d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    integer(kind=int32), intent(in), dimension(:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_int64_1d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    integer(kind=int64), intent(in), dimension(:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_real32_1d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    real(kind=real32), intent(in), dimension(:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_real64_1d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    real(kind=real64), intent(in), dimension(:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_complex_real32_1d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    complex(kind=real32), intent(in), dimension(:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_complex_real64_1d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    complex(kind=real64), intent(in), dimension(:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_int32_2d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    integer(kind=int32), intent(in), dimension(:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_int64_2d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    integer(kind=int64), intent(in), dimension(:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_real32_2d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    real(kind=real32), intent(in), dimension(:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_real64_2d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    real(kind=real64), intent(in), dimension(:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_complex_real32_2d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    complex(kind=real32), intent(in), dimension(:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_complex_real64_2d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    complex(kind=real64), intent(in), dimension(:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_int32_3d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    integer(kind=int32), intent(in), dimension(:,:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_int64_3d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    integer(kind=int64), intent(in), dimension(:,:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_real32_3d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    real(kind=real32), intent(in), dimension(:,:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_real64_3d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    real(kind=real64), intent(in), dimension(:,:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_complex_real32_3d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    complex(kind=real32), intent(in), dimension(:,:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_complex_real64_3d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    complex(kind=real64), intent(in), dimension(:,:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_int32_4d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    integer(kind=int32), intent(in), dimension(:,:,:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_int64_4d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    integer(kind=int64), intent(in), dimension(:,:,:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_real32_4d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    real(kind=real32), intent(in), dimension(:,:,:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_real64_4d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    real(kind=real64), intent(in), dimension(:,:,:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_complex_real32_4d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    complex(kind=real32), intent(in), dimension(:,:,:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_complex_real64_4d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    complex(kind=real64), intent(in), dimension(:,:,:,:):: array

    Create a new ndarray with a copy of the data given in 'array'

    Return Value integer(kind=C_INT)

    Error code, 0 on success

public interface ndarray_create_nocopy

Create a ndarray wrapper for a Fortran array. NO copy is made, changes to the Fortran array affect the ndarray and vice versa.

  • private function ndarray_create_nocopy_int32_1d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    integer(kind=int32), intent(in), dimension(:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_int64_1d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    integer(kind=int64), intent(in), dimension(:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_real32_1d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    real(kind=real32), intent(in), dimension(:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_real64_1d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    real(kind=real64), intent(in), dimension(:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_complex_real32_1d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    complex(kind=real32), intent(in), dimension(:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_complex_real64_1d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    complex(kind=real64), intent(in), dimension(:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_int32_2d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    integer(kind=int32), intent(in), dimension(:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_int64_2d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    integer(kind=int64), intent(in), dimension(:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_real32_2d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    real(kind=real32), intent(in), dimension(:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_real64_2d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    real(kind=real64), intent(in), dimension(:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_complex_real32_2d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    complex(kind=real32), intent(in), dimension(:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_complex_real64_2d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    complex(kind=real64), intent(in), dimension(:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_int32_3d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    integer(kind=int32), intent(in), dimension(:,:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_int64_3d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    integer(kind=int64), intent(in), dimension(:,:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_real32_3d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    real(kind=real32), intent(in), dimension(:,:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_real64_3d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    real(kind=real64), intent(in), dimension(:,:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_complex_real32_3d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    complex(kind=real32), intent(in), dimension(:,:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_complex_real64_3d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    complex(kind=real64), intent(in), dimension(:,:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_int32_4d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    integer(kind=int32), intent(in), dimension(:,:,:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_int64_4d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    integer(kind=int64), intent(in), dimension(:,:,:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_real32_4d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    real(kind=real32), intent(in), dimension(:,:,:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_real64_4d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    real(kind=real64), intent(in), dimension(:,:,:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_complex_real32_4d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    complex(kind=real32), intent(in), dimension(:,:,:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_nocopy_complex_real64_4d(res, array) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: res

    The resulting ndarray (in Fortran storage order).

    complex(kind=real64), intent(in), dimension(:,:,:,:), target:: array

    The Fortran array to wrap as ndarray. NO copy is made. Changes to the ndarray affect the Fortran array and vice versa. MUST be a contiguous array (this is not checked).

    Return Value integer(kind=C_INT)

    Error code, 0 on success

public interface ndarray_create_empty

Creates an empty ndarray of given shape. Array contains uninitialised values.

  • private function ndarray_create_empty_aint32(array, a_shape, dtype, order) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: array

    The resulting ndarray.

    integer(kind=int32), intent(in), dimension(:):: a_shape

    Shape of ndarray to create.

    character(kind=C_CHAR,len=*), intent(in), optional :: dtype

    numpy.dtype of ndarray (default: 'float')

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

    Storage order: 'F' (Fortran) or 'C' (default: 'F')

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_empty_aint64(array, a_shape, dtype, order) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: array

    The resulting ndarray.

    integer(kind=int64), intent(in), dimension(:):: a_shape

    Shape of ndarray to create.

    character(kind=C_CHAR,len=*), intent(in), optional :: dtype

    numpy.dtype of ndarray (default: 'float')

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

    Storage order: 'F' (Fortran) or 'C' (default: 'F')

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_empty_int32(array, length, dtype, order) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: array

    The resulting one dimensional ndarray.

    integer(kind=int32), intent(in) :: length

    Number of elements in ndarray

    character(kind=C_CHAR,len=*), intent(in), optional :: dtype

    numpy.dtype of ndarray (default: 'float')

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

    Storage order: 'F' (Fortran) or 'C' (default: 'F'). In case of 1D array not relevant.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_empty_int64(array, length, dtype, order) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: array

    The resulting one dimensional ndarray.

    integer(kind=int64), intent(in) :: length

    Number of elements in ndarray

    character(kind=C_CHAR,len=*), intent(in), optional :: dtype

    numpy.dtype of ndarray (default: 'float')

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

    Storage order: 'F' (Fortran) or 'C' (default: 'F'). In case of 1D array not relevant.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

public interface ndarray_create_zeros

Creates a ndarray of zeroes.

  • private function ndarray_create_zeros_aint32(array, a_shape, dtype, order) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: array

    The resulting ndarray.

    integer(kind=int32), intent(in), dimension(:):: a_shape

    Shape of ndarray to create.

    character(kind=C_CHAR,len=*), intent(in), optional :: dtype

    numpy.dtype of ndarray (default: 'float')

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

    Storage order: 'F' (Fortran) or 'C' (default: 'F')

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_zeros_aint64(array, a_shape, dtype, order) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: array

    The resulting ndarray.

    integer(kind=int64), intent(in), dimension(:):: a_shape

    Shape of ndarray to create.

    character(kind=C_CHAR,len=*), intent(in), optional :: dtype

    numpy.dtype of ndarray (default: 'float')

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

    Storage order: 'F' (Fortran) or 'C' (default: 'F')

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_zeros_int32(array, length, dtype, order) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: array

    The resulting one dimensional ndarray.

    integer(kind=int32), intent(in) :: length

    Number of elements in ndarray

    character(kind=C_CHAR,len=*), intent(in), optional :: dtype

    numpy.dtype of ndarray (default: 'float')

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

    Storage order: 'F' (Fortran) or 'C' (default: 'F'). In case of 1D array not relevant.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_zeros_int64(array, length, dtype, order) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: array

    The resulting one dimensional ndarray.

    integer(kind=int64), intent(in) :: length

    Number of elements in ndarray

    character(kind=C_CHAR,len=*), intent(in), optional :: dtype

    numpy.dtype of ndarray (default: 'float')

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

    Storage order: 'F' (Fortran) or 'C' (default: 'F'). In case of 1D array not relevant.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

public interface ndarray_create_ones

Creates a ndarray of ones.

  • private function ndarray_create_ones_aint32(array, a_shape, dtype, order) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: array

    The resulting ndarray.

    integer(kind=int32), intent(in), dimension(:):: a_shape

    Shape of ndarray to create.

    character(kind=C_CHAR,len=*), intent(in), optional :: dtype

    numpy.dtype of ndarray (default: 'float')

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

    Storage order: 'F' (Fortran) or 'C' (default: 'F')

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_ones_aint64(array, a_shape, dtype, order) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: array

    The resulting ndarray.

    integer(kind=int64), intent(in), dimension(:):: a_shape

    Shape of ndarray to create.

    character(kind=C_CHAR,len=*), intent(in), optional :: dtype

    numpy.dtype of ndarray (default: 'float')

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

    Storage order: 'F' (Fortran) or 'C' (default: 'F')

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_ones_int32(array, length, dtype, order) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: array

    The resulting one dimensional ndarray.

    integer(kind=int32), intent(in) :: length

    Number of elements in ndarray

    character(kind=C_CHAR,len=*), intent(in), optional :: dtype

    numpy.dtype of ndarray (default: 'float')

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

    Storage order: 'F' (Fortran) or 'C' (default: 'F'). In case of 1D array not relevant.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

  • private function ndarray_create_ones_int64(array, length, dtype, order) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: array

    The resulting one dimensional ndarray.

    integer(kind=int64), intent(in) :: length

    Number of elements in ndarray

    character(kind=C_CHAR,len=*), intent(in), optional :: dtype

    numpy.dtype of ndarray (default: 'float')

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

    Storage order: 'F' (Fortran) or 'C' (default: 'F'). In case of 1D array not relevant.

    Return Value integer(kind=C_INT)

    Error code, 0 on success

public interface cast

Casts/Transforms between Fortran and Python datatypes

  • private function cast_to_list(li, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(list), intent(out) :: li
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_to_dict(di, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(dict), intent(out) :: di
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_to_tuple(tu, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(tuple), intent(out) :: tu
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_to_NoneType(no, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(NoneType), intent(out) :: no
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_to_ndarray(nd, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(ndarray), intent(out) :: nd
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_to_object(plain_obj, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(object), intent(out) :: plain_obj
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_to_char_1d(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    character(kind=C_CHAR), dimension(:), pointer:: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_to_chars(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    character(kind=C_CHAR,len=:), intent(out), allocatable:: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_to_int32(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int32), intent(out) :: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_to_int32_flex(out_value, obj, strict) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int32), intent(out) :: out_value
    class(object), intent(in) :: obj
    logical, intent(in) :: strict

    Return Value integer(kind=C_INT)

  • private function cast_from_int32(obj, in_value) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(object), intent(out) :: obj
    integer(kind=int32), intent(in) :: in_value

    Return Value integer(kind=C_INT)

  • private function cast_to_int64(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int64), intent(out) :: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_to_int64_flex(out_value, obj, strict) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int64), intent(out) :: out_value
    class(object), intent(in) :: obj
    logical, intent(in) :: strict

    Return Value integer(kind=C_INT)

  • private function cast_from_int64(obj, in_value) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(object), intent(out) :: obj
    integer(kind=int64), intent(in) :: in_value

    Return Value integer(kind=C_INT)

  • private function cast_to_real32(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    real(kind=real32), intent(out) :: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_to_real32_flex(out_value, obj, strict) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    real(kind=real32), intent(out) :: out_value
    class(object), intent(in) :: obj
    logical, intent(in) :: strict

    Return Value integer(kind=C_INT)

  • private function cast_from_real32(obj, in_value) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(object), intent(out) :: obj
    real(kind=real32), intent(in) :: in_value

    Return Value integer(kind=C_INT)

  • private function cast_to_real64(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    real(kind=real64), intent(out) :: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_to_real64_flex(out_value, obj, strict) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    real(kind=real64), intent(out) :: out_value
    class(object), intent(in) :: obj
    logical, intent(in) :: strict

    Return Value integer(kind=C_INT)

  • private function cast_from_real64(obj, in_value) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(object), intent(out) :: obj
    real(kind=real64), intent(in) :: in_value

    Return Value integer(kind=C_INT)

  • private function cast_to_complex_real32(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=real32), intent(out) :: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_to_complex_real32_flex(out_value, obj, strict) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=real32), intent(out) :: out_value
    class(object), intent(in) :: obj
    logical, intent(in) :: strict

    Return Value integer(kind=C_INT)

  • private function cast_from_complex_real32(obj, in_value) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(object), intent(out) :: obj
    complex(kind=real32), intent(in) :: in_value

    Return Value integer(kind=C_INT)

  • private function cast_to_complex_real64(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=real64), intent(out) :: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_to_complex_real64_flex(out_value, obj, strict) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=real64), intent(out) :: out_value
    class(object), intent(in) :: obj
    logical, intent(in) :: strict

    Return Value integer(kind=C_INT)

  • private function cast_from_complex_real64(obj, in_value) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(object), intent(out) :: obj
    complex(kind=real64), intent(in) :: in_value

    Return Value integer(kind=C_INT)

  • private function cast_to_logical(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    logical, intent(out) :: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_to_logical_flex(out_value, obj, strict) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    logical, intent(out) :: out_value
    class(object), intent(in) :: obj
    logical, intent(in) :: strict

    Return Value integer(kind=C_INT)

  • private function cast_from_logical(obj, in_value) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(object), intent(out) :: obj
    logical, intent(in) :: in_value

    Return Value integer(kind=C_INT)

public interface cast_nonstrict

Non-strict casts/transforms between Fortran and Python datatypes

  • private function cast_nonstrict_to_list(li, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(list), intent(out) :: li
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_nonstrict_to_tuple(tu, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    type(tuple), intent(out) :: tu
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_nonstrict_to_chars(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    character(kind=C_CHAR,len=:), intent(out), allocatable:: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_nonstrict_to_int32(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int32), intent(out) :: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_nonstrict_to_int64(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int64), intent(out) :: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_nonstrict_to_real32(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    real(kind=real32), intent(out) :: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_nonstrict_to_real64(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    real(kind=real64), intent(out) :: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_nonstrict_to_complex_real32(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=real32), intent(out) :: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_nonstrict_to_complex_real64(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=real64), intent(out) :: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)

  • private function cast_nonstrict_to_logical(out_value, obj) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    logical, intent(out) :: out_value
    class(object), intent(in) :: obj

    Return Value integer(kind=C_INT)


Derived Types

type, public :: object

Type to represent an arbitrary Python object

Type-Bound Procedures

procedure, public :: destroy => object_destroy

Call to allow for freeing of resources of this object.

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

procedure, public :: delattr => object_delattr

Delete an attribute of this object

procedure, public :: get_c_ptr => object_get_c_ptr

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

type, public, extends(object) :: type_py

Type that represents a "class object". In Python class objects have the type 'type' which we name type_py here.

Type-Bound Procedures

procedure, public :: destroy => object_destroy

Call to allow for freeing of resources of this object.

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

procedure, public :: delattr => object_delattr

Delete an attribute of this object

procedure, public :: get_c_ptr => object_get_c_ptr

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

type, public, abstract, extends(object) :: Sequence

Abstract type that represents sequence objects. Elements of a sequence can be accessed by an index.

Type-Bound Procedures

procedure, public :: destroy => object_destroy

Call to allow for freeing of resources of this object.

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

procedure, public :: delattr => object_delattr

Delete an attribute of this object

procedure, public :: get_c_ptr => object_get_c_ptr

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

generic, public :: len => sequence_len_int32

Get the length of the object (number of elements).

generic, public :: count => sequence_count_int32
generic, public :: index => sequence_index_int32

Get the first index of a value.

generic, public :: getitem => sequence_getitem_int32_object

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_int32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_int64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_complex_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_complex_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_logical

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_char_1d

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_chars

Get item at a certain index

generic, public :: len => sequence_len_int64

Get the length of the object (number of elements).

generic, public :: count => sequence_count_int64
generic, public :: index => sequence_index_int64

Get the first index of a value.

generic, public :: getitem => sequence_getitem_int64_object

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_int32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_int64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_complex_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_complex_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_logical

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_char_1d

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_chars

Get item at a certain index

procedure, public :: contains => sequence_contains

Checks if a given item is contained in the sequence.

type, public, abstract, extends(Sequence) :: MutableSequence

Abstract type that represents a sequence, whose items can be changed.

Type-Bound Procedures

procedure, public :: destroy => object_destroy

Call to allow for freeing of resources of this object.

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

procedure, public :: delattr => object_delattr

Delete an attribute of this object

procedure, public :: get_c_ptr => object_get_c_ptr

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

generic, public :: len => sequence_len_int32

Get the length of the object (number of elements).

generic, public :: count => sequence_count_int32
generic, public :: index => sequence_index_int32

Get the first index of a value.

generic, public :: getitem => sequence_getitem_int32_object

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_int32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_int64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_complex_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_complex_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_logical

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_char_1d

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_chars

Get item at a certain index

generic, public :: len => sequence_len_int64

Get the length of the object (number of elements).

generic, public :: count => sequence_count_int64
generic, public :: index => sequence_index_int64

Get the first index of a value.

generic, public :: getitem => sequence_getitem_int64_object

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_int32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_int64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_complex_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_complex_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_logical

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_char_1d

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_chars

Get item at a certain index

procedure, public :: contains => sequence_contains

Checks if a given item is contained in the sequence.

generic, public :: setitem => mutablesequence_setitem_int32_object

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_int32

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_int64

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_real32

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_real64

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_complex_real32

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_complex_real64

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_logical

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_char_1d

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_chars

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_object

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_int32

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_int64

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_real32

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_real64

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_complex_real32

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_complex_real64

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_logical

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_char_1d

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_chars

Set an item at a given index

type, public, abstract, extends(Sequence) :: ImmutableSequence

Abstract type that represents a sequence, whose items can not be changed.

Type-Bound Procedures

procedure, public :: destroy => object_destroy

Call to allow for freeing of resources of this object.

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

procedure, public :: delattr => object_delattr

Delete an attribute of this object

procedure, public :: get_c_ptr => object_get_c_ptr

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

generic, public :: len => sequence_len_int32

Get the length of the object (number of elements).

generic, public :: count => sequence_count_int32
generic, public :: index => sequence_index_int32

Get the first index of a value.

generic, public :: getitem => sequence_getitem_int32_object

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_int32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_int64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_complex_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_complex_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_logical

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_char_1d

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_chars

Get item at a certain index

generic, public :: len => sequence_len_int64

Get the length of the object (number of elements).

generic, public :: count => sequence_count_int64
generic, public :: index => sequence_index_int64

Get the first index of a value.

generic, public :: getitem => sequence_getitem_int64_object

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_int32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_int64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_complex_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_complex_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_logical

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_char_1d

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_chars

Get item at a certain index

procedure, public :: contains => sequence_contains

Checks if a given item is contained in the sequence.

type, public, extends(MutableSequence) :: list

Type that corresponds to a Python list.

Type-Bound Procedures

procedure, public :: destroy => object_destroy

Call to allow for freeing of resources of this object.

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

procedure, public :: delattr => object_delattr

Delete an attribute of this object

procedure, public :: get_c_ptr => object_get_c_ptr

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

generic, public :: len => sequence_len_int32

Get the length of the object (number of elements).

generic, public :: count => sequence_count_int32
generic, public :: index => sequence_index_int32

Get the first index of a value.

generic, public :: getitem => sequence_getitem_int32_object

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_int32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_int64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_complex_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_complex_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_logical

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_char_1d

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_chars

Get item at a certain index

generic, public :: len => sequence_len_int64

Get the length of the object (number of elements).

generic, public :: count => sequence_count_int64
generic, public :: index => sequence_index_int64

Get the first index of a value.

generic, public :: getitem => sequence_getitem_int64_object

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_int32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_int64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_complex_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_complex_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_logical

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_char_1d

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_chars

Get item at a certain index

procedure, public :: contains => sequence_contains

Checks if a given item is contained in the sequence.

generic, public :: setitem => mutablesequence_setitem_int32_object

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_int32

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_int64

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_real32

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_real64

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_complex_real32

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_complex_real64

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_logical

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_char_1d

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int32_chars

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_object

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_int32

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_int64

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_real32

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_real64

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_complex_real32

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_complex_real64

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_logical

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_char_1d

Set an item at a given index

generic, public :: setitem => mutablesequence_setitem_int64_chars

Set an item at a given index

generic, public :: append => list_append_object

Append an item at the end of a list

procedure, public :: copy => list_copy

Creates a copy of a list

procedure, public :: sort => list_sort

Sorts the list.

procedure, public :: reverse => list_reverse

Reverses a list.

procedure, public :: add => list_add

Concatenates another list at the end of a list.

generic, public :: insert => list_insert_int32

Inserts item at given index.

generic, public :: delitem => list_delitem_int32

Deletes item at given index from list.

generic, public :: insert => list_insert_int64

Inserts item at given index.

generic, public :: delitem => list_delitem_int64

Deletes item at given index from list.

generic, public :: append => list_append_int32

Append an item at the end of a list

generic, public :: append => list_append_int64

Append an item at the end of a list

generic, public :: append => list_append_real32

Append an item at the end of a list

generic, public :: append => list_append_real64

Append an item at the end of a list

generic, public :: append => list_append_complex_real32

Append an item at the end of a list

generic, public :: append => list_append_complex_real64

Append an item at the end of a list

generic, public :: append => list_append_logical

Append an item at the end of a list

generic, public :: append => list_append_char_1d

Append an item at the end of a list

generic, public :: append => list_append_chars

Append an item at the end of a list

type, public, abstract, extends(object) :: Mapping

Abstract type that represents a datastructure that maps keys to values.

Type-Bound Procedures

procedure, public :: destroy => object_destroy

Call to allow for freeing of resources of this object.

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

procedure, public :: delattr => object_delattr

Delete an attribute of this object

procedure, public :: get_c_ptr => object_get_c_ptr

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

generic, public :: getitem => mapping_getitem_object_object

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_object_object

Inserts value at given key. Sets value if key already exists.

generic, public :: delitem => mapping_delitem_object

Delete key-value pair with given key.

generic, public :: getitem => mapping_getitem_int32_object

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_object

Inserts value at given key. Sets value if key already exists.

generic, public :: delitem => mapping_delitem_int32
generic, public :: getitem => mapping_getitem_int32_int32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_int32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int32_int64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_int64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int32_real32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_real32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int32_real64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_real64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int32_complex_real32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_complex_real32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int32_complex_real64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_complex_real64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int32_logical

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_logical

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int32_char_1d

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_char_1d

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int32_chars

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_chars

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_object

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_object

Inserts value at given key. Sets value if key already exists.

generic, public :: delitem => mapping_delitem_int64
generic, public :: getitem => mapping_getitem_int64_int32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_int32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_int64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_int64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_real32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_real32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_real64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_real64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_complex_real32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_complex_real32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_complex_real64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_complex_real64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_logical

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_logical

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_char_1d

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_char_1d

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_chars

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_chars

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_object

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_object

Inserts value at given key. Sets value if key already exists.

generic, public :: delitem => mapping_delitem_chars
generic, public :: getitem => mapping_getitem_chars_int32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_int32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_int64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_int64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_real32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_real32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_real64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_real64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_complex_real32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_complex_real32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_complex_real64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_complex_real64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_logical

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_logical

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_char_1d

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_char_1d

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_chars

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_chars

Inserts value at given key. Sets value if key already exists.

generic, public :: len => mapping_len_int32

Get number of key-value pairs.

generic, public :: len => mapping_len_int64

Get number of key-value pairs.

procedure, public :: mapping_contains

Checks if key is contained in datastructure.

type, public, extends(Mapping) :: dict

Type-Bound Procedures

procedure, public :: destroy => object_destroy

Call to allow for freeing of resources of this object.

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

procedure, public :: delattr => object_delattr

Delete an attribute of this object

procedure, public :: get_c_ptr => object_get_c_ptr

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

generic, public :: getitem => mapping_getitem_object_object

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_object_object

Inserts value at given key. Sets value if key already exists.

generic, public :: delitem => mapping_delitem_object

Delete key-value pair with given key.

generic, public :: getitem => mapping_getitem_int32_object

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_object

Inserts value at given key. Sets value if key already exists.

generic, public :: delitem => mapping_delitem_int32
generic, public :: getitem => mapping_getitem_int32_int32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_int32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int32_int64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_int64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int32_real32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_real32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int32_real64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_real64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int32_complex_real32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_complex_real32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int32_complex_real64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_complex_real64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int32_logical

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_logical

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int32_char_1d

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_char_1d

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int32_chars

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int32_chars

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_object

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_object

Inserts value at given key. Sets value if key already exists.

generic, public :: delitem => mapping_delitem_int64
generic, public :: getitem => mapping_getitem_int64_int32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_int32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_int64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_int64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_real32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_real32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_real64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_real64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_complex_real32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_complex_real32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_complex_real64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_complex_real64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_logical

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_logical

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_char_1d

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_char_1d

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_int64_chars

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_int64_chars

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_object

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_object

Inserts value at given key. Sets value if key already exists.

generic, public :: delitem => mapping_delitem_chars
generic, public :: getitem => mapping_getitem_chars_int32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_int32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_int64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_int64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_real32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_real32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_real64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_real64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_complex_real32

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_complex_real32

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_complex_real64

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_complex_real64

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_logical

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_logical

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_char_1d

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_char_1d

Inserts value at given key. Sets value if key already exists.

generic, public :: getitem => mapping_getitem_chars_chars

Get value at a given key. KeyError if key does not exist

generic, public :: setitem => mapping_setitem_chars_chars

Inserts value at given key. Sets value if key already exists.

generic, public :: len => mapping_len_int32

Get number of key-value pairs.

generic, public :: len => mapping_len_int64

Get number of key-value pairs.

procedure, public :: mapping_contains

Checks if key is contained in datastructure.

procedure, public :: clear => dict_clear

Removes all key-value pairs from dictionary.

procedure, public :: copy => dict_copy

Creates a copy of dict

procedure, public :: keys => dict_keys

Creates a list of a dict's keys

procedure, public :: items => dict_items

Creates a list of a dict's key-value pairs.

procedure, public :: values => dict_values

Creates a list of a dict's values

generic, public :: get => dict_get_object_object

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int32_object

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int32_int32

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int32_int64

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int32_real32

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int32_real64

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int32_complex_real32

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int32_complex_real64

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int32_logical

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int32_char_1d

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int32_chars

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int64_object

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int64_int32

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int64_int64

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int64_real32

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int64_real64

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int64_complex_real32

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int64_complex_real64

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int64_logical

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int64_char_1d

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_int64_chars

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_chars_object

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_chars_int32

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_chars_int64

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_chars_real32

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_chars_real64

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_chars_complex_real32

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_chars_complex_real64

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_chars_logical

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_chars_char_1d

Get value at a given key. If key does not exist, return a default value.

generic, public :: get => dict_get_chars_chars

Get value at a given key. If key does not exist, return a default value.

procedure, public :: setdefault => dict_setdefault_object_object

Get value at a given key. If key does not exist, set value at key to default value and return default.

type, public, extends(ImmutableSequence) :: tuple

Type that corresponds to a Python tuple. Create with tuple_create.

Type-Bound Procedures

procedure, public :: destroy => object_destroy

Call to allow for freeing of resources of this object.

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

procedure, public :: delattr => object_delattr

Delete an attribute of this object

procedure, public :: get_c_ptr => object_get_c_ptr

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

generic, public :: len => sequence_len_int32

Get the length of the object (number of elements).

generic, public :: count => sequence_count_int32
generic, public :: index => sequence_index_int32

Get the first index of a value.

generic, public :: getitem => sequence_getitem_int32_object

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_int32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_int64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_complex_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_complex_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_logical

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_char_1d

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_chars

Get item at a certain index

generic, public :: len => sequence_len_int64

Get the length of the object (number of elements).

generic, public :: count => sequence_count_int64
generic, public :: index => sequence_index_int64

Get the first index of a value.

generic, public :: getitem => sequence_getitem_int64_object

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_int32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_int64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_complex_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_complex_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_logical

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_char_1d

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_chars

Get item at a certain index

procedure, public :: contains => sequence_contains

Checks if a given item is contained in the sequence.

generic, public :: setitem => tuple_setitem_int32_object

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int32_int32

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int32_int64

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int32_real32

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int32_real64

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int32_complex_real32

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int32_complex_real64

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int32_logical

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int32_char_1d

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int32_chars

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int64_object

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int64_int32

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int64_int64

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int64_real32

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int64_real64

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int64_complex_real32

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int64_complex_real64

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int64_logical

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int64_char_1d

Sets item at given index. One must set all items before use of tuple.

generic, public :: setitem => tuple_setitem_int64_chars

Sets item at given index. One must set all items before use of tuple.

procedure, public :: add => tuple_add

Concatenates tuples.

type, public, extends(ImmutableSequence) :: bytes

Type corresponding to Python 'bytes'.

Type-Bound Procedures

procedure, public :: destroy => object_destroy

Call to allow for freeing of resources of this object.

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

procedure, public :: delattr => object_delattr

Delete an attribute of this object

procedure, public :: get_c_ptr => object_get_c_ptr

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

generic, public :: len => sequence_len_int32

Get the length of the object (number of elements).

generic, public :: count => sequence_count_int32
generic, public :: index => sequence_index_int32

Get the first index of a value.

generic, public :: getitem => sequence_getitem_int32_object

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_int32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_int64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_complex_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_complex_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_logical

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_char_1d

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_chars

Get item at a certain index

generic, public :: len => sequence_len_int64

Get the length of the object (number of elements).

generic, public :: count => sequence_count_int64
generic, public :: index => sequence_index_int64

Get the first index of a value.

generic, public :: getitem => sequence_getitem_int64_object

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_int32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_int64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_complex_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_complex_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_logical

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_char_1d

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_chars

Get item at a certain index

procedure, public :: contains => sequence_contains

Checks if a given item is contained in the sequence.

type, public, extends(ImmutableSequence) :: str

Type corresponding to Python 'str' - Python's string type.

Type-Bound Procedures

procedure, public :: destroy => object_destroy

Call to allow for freeing of resources of this object.

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

procedure, public :: delattr => object_delattr

Delete an attribute of this object

procedure, public :: get_c_ptr => object_get_c_ptr

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

generic, public :: len => sequence_len_int32

Get the length of the object (number of elements).

generic, public :: count => sequence_count_int32
generic, public :: index => sequence_index_int32

Get the first index of a value.

generic, public :: getitem => sequence_getitem_int32_object

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_int32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_int64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_complex_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_complex_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_logical

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_char_1d

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_chars

Get item at a certain index

generic, public :: len => sequence_len_int64

Get the length of the object (number of elements).

generic, public :: count => sequence_count_int64
generic, public :: index => sequence_index_int64

Get the first index of a value.

generic, public :: getitem => sequence_getitem_int64_object

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_int32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_int64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_complex_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_complex_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_logical

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_char_1d

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_chars

Get item at a certain index

procedure, public :: contains => sequence_contains

Checks if a given item is contained in the sequence.

type, public, extends(ImmutableSequence) :: unicode

Type corresponding to Python 2 'unicode' or Python 3 'str'.

Type-Bound Procedures

procedure, public :: destroy => object_destroy

Call to allow for freeing of resources of this object.

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

procedure, public :: delattr => object_delattr

Delete an attribute of this object

procedure, public :: get_c_ptr => object_get_c_ptr

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

generic, public :: len => sequence_len_int32

Get the length of the object (number of elements).

generic, public :: count => sequence_count_int32
generic, public :: index => sequence_index_int32

Get the first index of a value.

generic, public :: getitem => sequence_getitem_int32_object

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_int32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_int64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_complex_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_complex_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_logical

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_char_1d

Get item at a certain index

generic, public :: getitem => sequence_getitem_int32_chars

Get item at a certain index

generic, public :: len => sequence_len_int64

Get the length of the object (number of elements).

generic, public :: count => sequence_count_int64
generic, public :: index => sequence_index_int64

Get the first index of a value.

generic, public :: getitem => sequence_getitem_int64_object

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_int32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_int64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_complex_real32

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_complex_real64

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_logical

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_char_1d

Get item at a certain index

generic, public :: getitem => sequence_getitem_int64_chars

Get item at a certain index

procedure, public :: contains => sequence_contains

Checks if a given item is contained in the sequence.

type, public, extends(object) :: module_py

Type representing a Python module

Type-Bound Procedures

procedure, public :: destroy => object_destroy

Call to allow for freeing of resources of this object.

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

procedure, public :: delattr => object_delattr

Delete an attribute of this object

procedure, public :: get_c_ptr => object_get_c_ptr

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

type, public, extends(object) :: NoneType

Type representing Python's 'None'. Create with NoneType_create.

Type-Bound Procedures

procedure, public :: destroy => object_destroy

Call to allow for freeing of resources of this object.

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

procedure, public :: delattr => object_delattr

Delete an attribute of this object

procedure, public :: get_c_ptr => object_get_c_ptr

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

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.

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

procedure, public :: delattr => object_delattr

Delete an attribute of this object

procedure, public :: get_c_ptr => object_get_c_ptr

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

generic, public :: get_data => get_data_int32_1d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_int64_1d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_real32_1d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_real64_1d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_complex_real32_1d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_complex_real64_1d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_int32_2d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_int64_2d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_real32_2d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_real64_2d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_complex_real32_2d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_complex_real64_2d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_int32_3d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_int64_3d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_real32_3d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_real64_3d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_complex_real32_3d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_complex_real64_3d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_int32_4d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_int64_4d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_real32_4d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_real64_4d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_complex_real32_4d

Retrieve a Fortran pointer to the array data.

generic, public :: get_data => get_data_complex_real64_4d

Retrieve a Fortran pointer to the array data.

procedure, public :: transpose => ndarray_transpose

Transpose the array.

procedure, public :: copy => ndarray_copy

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

procedure, public :: is_ordered => ndarray_is_ordered

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

procedure, public :: get_dtype_name => ndarray_get_dtype_name

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

generic, public :: ndim => ndarray_ndim_int32

Get dimension of array

generic, public :: ndim => ndarray_ndim_int64

Get dimension of array

type, public :: PythonMethodTable

Only used for writing Python extension modules. Datastructure to hold table of methods of your Python extension module. Put exactly one instance at Fortran module level.

Type-Bound Procedures

procedure, public :: init => PythonMethodTable_init

Initialises the method table. Call in PyInit_module name (Py3) / initmodule name (Py2)

procedure, public :: add_method => PythonMethodTable_add_method

Adds a method to your Python module

procedure, public :: get_method_table => PythonMethodTable_get

Used only internally. Gets type(c_ptr) to method table.

type, public :: PythonModule

Only used for writing Python extension modules. Datastructure to hold information about your Python extension module. Put exactly one instance at Fortran module level.

Type-Bound Procedures

procedure, public :: init => PythonModule_init

Initialises the PythonModule with a PythonMethod table.

procedure, public :: add_object => PythonModule_add_object

Adds a Python object to the module that can be accessed by my_module.the_name_of_object_added Useful to add constants to a Python module


Functions

public function forpy_initialize(use_numpy) result(ierror)

Initialisation of forpy module. Must be called before using forpy.

Arguments

Type IntentOptional AttributesName
logical, intent(in), optional :: use_numpy

Set to .false., if you do not need the array features of forpy powered by numpy. (Default: .true.)

Return Value integer(kind=C_INT)

public function forpy_initialize_ext(use_numpy) result(ierror)

Arguments

Type IntentOptional AttributesName
logical, intent(in), optional :: use_numpy

Set to .false., if you do not need the array features of forpy powered by numpy. (Default: .true.)

Return Value integer(kind=C_INT)

public function is_long(obj)

Checks if object is a Python long.

Arguments

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

The object to check.

Return Value logical

public function is_list(obj)

Checks if object is a Python list.

Arguments

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

The object to check.

Return Value logical

public function is_tuple(obj)

Checks if object is a Python tuple.

Arguments

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

The object to check.

Return Value logical

public function is_bytes(obj)

Checks if object is a Python bytes.

Arguments

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

The object to check.

Return Value logical

public function is_dict(obj)

Checks if object is a Python dict.

Arguments

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

The object to check.

Return Value logical

public function is_float(obj)

Checks if object is a Python float.

Arguments

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

The object to check.

Return Value logical

public function is_complex(obj)

Checks if object is a Python complex.

Arguments

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

The object to check.

Return Value logical

public function is_bool(obj)

Checks if object is a Python bool.

Arguments

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

The object to check.

Return Value logical

public function is_unicode(obj)

Checks if object is a Python unicode.

Arguments

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

The object to check.

Return Value logical

public function is_int(obj)

Checks if object is a Python int

Arguments

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

The object to check.

Return Value logical

public function is_str(obj)

Checks if object is a Python str

Arguments

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

The object to check.

Return Value logical

public function is_none(obj)

Checks if object is a Python None.

Arguments

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

The object to check.

Return Value logical

public function is_null(obj)

Returns true if object is a null-pointer internally. Object is not properly initialised then.

Arguments

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

The object to check.

Return Value logical

public function is_ndarray(obj)

Checks if object is a Numpy array.

Arguments

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

The object to check.

Return Value logical

public function NoneType_create(r) result(ierror)

Creates a Python None.

Arguments

Type IntentOptional AttributesName
type(NoneType), intent(out) :: r

The created None

Return Value integer(kind=C_INT)

Error code, 0 on success

public function dict_create(r) result(ierror)

Creates an empty Python dictionary. Python: r = {}

Arguments

Type IntentOptional AttributesName
type(dict), intent(out) :: r

The created empty dict

Return Value integer(kind=C_INT)

Error code, 0 on success

public function import_py(mod_py, mod_name) result(ierror)

Import a Python module.

Arguments

Type IntentOptional AttributesName
type(module_py), intent(out) :: mod_py

The imported module

character(kind=C_CHAR,len=*), intent(in) :: mod_name

Name of the module to import. Name can include dots "."

Return Value integer(kind=C_INT)

Error code, 0 on success.

public function exception_matches(exc) result(is_match)

Checks if a certain type of exception has occurred.

Arguments

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

Return Value logical

public function have_exception()

returns .true. if an exception has occurred

Arguments

None

Return Value logical

public function print_py(obj, kwargs) result(ierror)

Python's print function.

Arguments

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

Object to print.

class(dict), intent(in), optional :: kwargs

Optional dict of keyword arguments

Return Value integer(kind=C_INT)

Error code, 0 on success

public function get_sys_path(paths) result(ierror)

Getting the list of module search paths: sys.path

Arguments

Type IntentOptional AttributesName
type(list), intent(out) :: paths

Output: list of module search paths

Return Value integer(kind=C_INT)

Error code, 0 on success

public function run_string(string) result(ierror)

Run Python code that is given as string.

Arguments

Type IntentOptional AttributesName
character(kind=C_CHAR,len=*), intent(in) :: string

Python code to run.

Return Value integer(kind=C_INT)

Error code, 0 on success


Subroutines

public subroutine forpy_finalize()

Frees resources used by Python interpreter. Call when finished using forpy.

Arguments

None

public subroutine err_clear()

Clears an exception.

Arguments

None

public subroutine err_print()

Prints and clears exception. If no exception has occurred, does nothing.

Arguments

None

public subroutine raise_exception(exc_type, message)

raises an exception

Arguments

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

The exception to raise.

character(kind=C_CHAR,len=*), intent(in) :: message

public subroutine unsafe_cast_from_c_ptr(obj, ptr)

Creates an object from a type(c_ptr), no type checks

Arguments

Type IntentOptional AttributesName
class(object), intent(out) :: obj

The created Python object.

type(c_ptr), intent(in) :: ptr

C pointer to cast from