Hi David,
I think that you can do what you want in one, rather long line:
hfile.createTable(grp, 'signal', description=np.array(zip(some_func(t, v)),
dtype=[('time', np.float64), ('value', np.float64)]))
Or two nicer lines:
arr = np.array(zip(some_func(t, v)), dtype=[('time', np.float64), ('val
Hi there,
I have some generic functions that take time series data with 2 numpy array
arguments, time and value, and return 2 numpy arrays of time and value.
I would like to place these arrays into a Numpy structured array or
directly into a new pytables table with fields, time and value.
Now Iv
dragan savic (el 2007-11-12 a les 14:47:32 -0800) va dir::
> Thanks for your quick reply. To be more clear I am
> doing some kind of a slice function where a user can
> select different fields and one row or vise verse from
> arbitrary number of tables. Since each field can have
> different types
Hello Ivan!
Thanks for your quick reply. To be more clear I am
doing some kind of a slice function where a user can
select different fields and one row or vise verse from
arbitrary number of tables. Since each field can have
different types I want to gather the data in a table
form. I thought of d
dragan savic (el 2007-11-12 a les 08:36:25 -0800) va dir::
> I have a question regarding numpy arrays.
> Lets say I have two arrays:
>
> a = array([1,2,3],dtype=float32)
> b = array([4,5,6],dtype=int16)
>
> I want to build a new array like this:
> new_array = hstack((row_stack(a),row_stack(b)))
Hello!
I have a question regarding numpy arrays.
Lets say I have two arrays:
a = array([1,2,3],dtype=float32)
b = array([4,5,6],dtype=int16)
I want to build a new array like this:
new_array = hstack((row_stack(a),row_stack(b)))
The result is:
array([[ 1., 4.],
[ 2., 5.],
[ 3.,