For comparison:
>>> float32(None)
nan
>>> float(None)
Traceback (most recent call last):
File "", line 1, in
TypeError: float() argument must be a string or a number
On Mon, Jan 28, 2013 at 5:09 PM, Bradley M. Froehle
wrote:
import numpy as np
np.double(None)
> nan
>
> On Mon, Jan 2
>>> import numpy as np
>>> np.double(None)
nan
On Mon, Jan 28, 2013 at 3:48 PM, Geoffrey Irving wrote:
> I discovered this from C via the PyArray_FromAny function, but here it
> is in Python:
>
> >>> asarray(None,dtype=float)
> array(nan)
>
> Is this expected or documented behavior?
I discovered this from C via the PyArray_FromAny function, but here it
is in Python:
>>> asarray(None,dtype=float)
array(nan)
Is this expected or documented behavior? It seems quite unintuitive
and surprising that this wouldn't throw an exception.
Is there a way to disable this behavior
Hi,
I have a somewhat convoluted N-dimensional array that contains information of a
set of experiments.
The last dimension has as many entries as iterations in the experiment (an
iterative application), and the penultimate dimension has as many entries as
times I have run that experiment; the res
Please ignore the previous message. I have done some testing and found it
to be running on a client node instead of the master node.
The problem might be because node2, does not have numpy installed. Thanks.
___
NumPy-Discussion mailing list
NumPy-Discus
Hello,
I have embedded python/numpy scripts in an application that runs in
parallel.
But the python code is always invoked on the master node.
So it could be assumed that at some point, there could be multiple
instances of script being invoked and run.
I have commented out import numpy part to se
Hi,
Le 28/01/2013 18:14, Till Stensitzki a écrit :
> On way would be just use cython, but i think this problem
> common enough to have a solution into scipy.
> (Solution of a simple compartment model.)
I see the solution you propose as a specialized ODE solver for linear
systems.
Then, what about
Thanks for hints so far, i am especially searching
for a way to get rid of the t loop. Making a NxMxM
Matrix is quite memory inefficient in my case (N > M).
On way would be just use cython, but i think this problem
common enough to have a solution into scipy.
(Solution of a simple compartment m
Hi,
Le 28/01/2013 17:31, Till Stensitzki a écrit :
> This is the calculates exp(-Kt).dot(y0) for a list a ts.
If your time vector ts is *regularly* discretized with a timestep h, you
could try an iterative computation
I would (roughly) write this as :
Ah = np.expm(A*h) # or use the "diagonalizat
I did not try it, but I assume that you can build a stack of diagonal matrices
as a MxNxN array and use tensordot with the matrix v (and it's inverse). The
trivial way to accelerate the loop is to calculate in inverse of v before the
loop.
Nadav
From:
On Mon, Jan 28, 2013 at 5:31 PM, Till Stensitzki wrote:
> Hi group,
> is there a faster way to calculate the
> matrix exponential for different t's
> than this:
>
> def sol_matexp(A, tlist, y0):
> w, v = np.linalg.eig(A)
> out = np.zeros((tlist.size, y0.size))
> for i, t in enumerate(t
Hi group,
is there a faster way to calculate the
matrix exponential for different t's
than this:
def sol_matexp(A, tlist, y0):
w, v = np.linalg.eig(A)
out = np.zeros((tlist.size, y0.size))
for i, t in enumerate(tlist):
sol_t = np.dot(v,np.diag(np.exp(-w*t))).dot(np.linalg.inv
Let's say I have two structured arrays with dtypes as per below
>>> getdat.dtype
dtype([('Tstamp', '|O4'), ('Vf', '>> out.dtype
dtype([('Viscosity_cSt', '>> rfn.merge_arrays((getdat, out), flatten = True, usemask = False,
asrecarray=False)
Traceback (most recent call last):
File "", line 1, in
13 matches
Mail list logo