wolfhece.pythonfortran.tools

Module Contents

wolfhece.pythonfortran.tools.make_nd_array(memory_address_ptr, shape, dtype=np.float64, order='F', own_data=False, readonly=False)[source]

Creating a Numpy object from a memory address (int) Using a function that creates a “buffer” structure from the memory address To complete the initialization, you also need to have the element arrangement “shape” and the memory size of an element “dtype” – Création d’un objet Numpy depuis une adresse mémoire (int) Utilisation d’une fonction qui crée une structure “buffer” depuis l’adresse mémoire Pour terminer l’initialisation, il faut également disposer de la disposition des éléments “shape” et de la taille mémoire d’un élément “dtype”

Parameters:
  • memory_address_ptr (int) – memory address - position of the first buffer element

  • shape (integer) – shape of the array

  • dtype (numpy type, optional) – Defaults to np.float64.

  • order (str, optional) – ‘C’ row major order or ‘F’ column major order. Defaults to ‘C’.

  • own_data (bool, optional) – If True, make a copy of the buffer. Defaults to True.

  • readonly (bool, optional) – If True, activate the Numpy writeable flag. Defaults to False.

Returns:

Numpy.ndarray