openforcefield.utils.utils.serialize_numpy¶
-
openforcefield.utils.utils.
serialize_numpy
(np_array)[source]¶ Serializes a numpy array into a JSON-compatible string. Leverages the numpy.save function, thereby preserving the shape of the input array
- Parameters
- np_arrayA numpy array
Input numpy array
- Returns
- serializedstr
A serialized representation of the numpy array.
- shapetuple of ints
The shape of the serialized array