Openpmd-api

Latest version: v0.16.1

Safety actively analyzes 723144 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 7

0.7.1alpha

-----------
**Date:** 2018-01-23

Bug Fixes in Multi-Platform Builds

This release fixes several issues on OSX, during cross-compile and with modern compilers.

0.7.0alpha

-----------

Python
^^^^^^

Module Name
"""""""""""

Our module name has changed to be consistent with other openPMD projects:

.. code-block:: python3

old name
import openPMD

new name
import openpmd_api

``store_chunk`` Method
""""""""""""""""""""""

The order of arguments in the ``store_chunk`` method for record components has changed.
The new order allows to make use of defaults in many cases in order reduce complexity.

.. code-block:: python3

particlePos_x = np.random.rand(234).astype(np.float32)

d = Dataset(particlePos_x.dtype, extent=particlePos_x.shape)
electrons["position"]["x"].reset_dataset(d)

old code
electrons["position"]["x"].store_chunk([0, ], particlePos_x.shape, particlePos_x)

new code
electrons["position"]["x"].store_chunk(particlePos_x)
implied defaults:
.store_chunk(particlePos_x,
offset=[0, ],
extent=particlePos_x.shape)

``load_chunk`` Method
"""""""""""""""""""""

The ``loadChunk<T>`` method with on-the-fly allocation has default arguments for offset and extent now.
Called without arguments, it will read the whole record component.

.. code-block:: python3

E_x = series.iterations[100].meshes["E"]["x"]

old code
all_data = E_x.load_chunk(np.zeros(E_x.shape), E_x.shape)

new code
all_data = E_x.load_chunk()

series.flush()

C++
^^^

``storeChunk`` Method
"""""""""""""""""""""

The order of arguments in the ``storeChunk`` method for record components has changed.
The new order allows to make use of defaults in many cases in order reduce complexity.

.. code-block:: cpp

std::vector< float > particlePos_x(234, 1.234);

Datatype datatype = determineDatatype(shareRaw(particlePos_x));
Extent extent = {particlePos_x.size()};
Dataset d = Dataset(datatype, extent);
electrons["position"]["x"].resetDataset(d);

// old code
electrons["position"]["x"].storeChunk({0}, extent, shareRaw(particlePos_x));

// new code
electrons["position"]["x"].storeChunk(particlePos_x);
/* implied defaults:
* .storeChunk(shareRaw(particlePos_x),
* {0},
* {particlePos_x.size()}) */

``loadChunk`` Method
""""""""""""""""""""

The order of arguments in the pre-allocated data overload of the ``loadChunk`` method for record components has changed.
The new order allows was introduced for consistency with ``storeChunk``.

.. code-block:: cpp

float loadOnePos;

// old code
electrons["position"]["x"].loadChunk({0}, {1}, shareRaw(&loadOnePos));

// new code
electrons["position"]["x"].loadChunk(shareRaw(&loadOnePos), {0}, {1});

series.flush();

The ``loadChunk<T>`` method with on-the-fly allocation got default arguments for offset and extent.
Called without arguments, it will read the whole record component.

.. code-block:: cpp

MeshRecordComponent E_x = series.iterations[100].meshes["E"]["x"];

// old code
auto all_data = E_x.loadChunk<double>({0, 0, 0}, E_x.getExtent());

// new code
auto all_data = E_x.loadChunk<double>();

series.flush();

0.6.3alpha

-----------
**Date:** 2018-11-12

Reading Varying Iteration Padding Reading

Support reading series with varying iteration padding (or no padding at all) as currently used in PIConGPU.

0.6.2alpha

-----------
**Date:** 2018-09-25

Python Stride: Regression

A regression in the last fix for python strides made the relaxation not efficient for 2-D and higher.

0.6.1alpha

-----------
**Date:** 2018-09-24

Relaxed Python Stride Checks

Python stride checks have been relaxed and one-element n-d arrays are allowed for scalars.

0.6.0alpha

-----------
**Date:** 2018-09-20

Particle Patches Improved, Constant Scalars and Python Containers Fixed

Scalar records properly support const-ness.
The Particle Patch load interface was changed, loading now all patches at once, and Python bindings are available.
Numpy ``dtype`` is now a first-class citizen for Python ``Datatype`` control, being accepted and returned instead of enums.
Python lifetime in garbage collection for containers such as ``meshes``, ``particles`` and ``iterations`` is now properly implemented.

Page 5 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.