Pipe numpy data in Linux?
No, data is passed through a pipe as text. You'll need to serialize the data in script1.py before writing, and deserialize it in script2.py after reading.
Is it possible to pipe numpy data (from one python script ) into the other?
suppose that script1.py looks like this:
x = np.zeros(3, dtype={'names':['col1', 'col2'], 'formats':['i4','f4']})
print x
Suppose that from the linux command, I run the following:
python script1.py | script2.py
Will script2.py get the piped numpy data as an input (stdin)? will the data still be in the same format of numpy? (so that I can, for example, perform numpy operations on it from within script2.py)?