Read array from a numpy file
readnumpy name
Reads in an array of numbers from a file with the specified name created with numpy Python package. Numpy
array may contain integer, floating point or complex numbers. Complex numbers are converted to 2-element arrays.
If the name does not contain an absolute path then the file is assumed to be in the current directory,
specified with the :pool_cfg,"current_dir
variable.
Example:
Run in Python:
import numpy as np
A = np.arange(2, 3, 0.1)
np.save('C:\test_array', A)
Run in POOL:
"A := readnumpy "|C:\test_array.npy|
print :A
Output:
{2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9}
See also:
Table of Content