read_binary#

pytwin.read_binary(filepath)#

Read a binary snapshot file from the disk.

Parameters:
filepathstr

Path of the binary file to be read.

Returns:
np.ndarray

Return a 1D flatenned Numpy array of snapshot data read.

Examples

>>> from pytwin import write_binary
>>> snapshot_data = read_binary('snapshot.bin')