[Numpy-discussion] Custom __array_interface__ error

2015-03-13 Thread Daniel Smith
, Invalid __array_interface__ value, must be a dict”); } Py_DECREF(iface); return NULL; } Thoughts? Cheers, -Daniel Smith ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy

[Numpy-discussion] Optimizing numpy's einsum expression (again)

2015-01-15 Thread Daniel Smith
solution becomes large. Do not worry about it. Thank you for your time, -Daniel Smith ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Optimizing multi-tensor contractions in numpy

2015-01-03 Thread Daniel Smith
not sure if this is possible for the faster greedy path algorithm without large changes. Overall this sounds great. If anyone has a suggestion of where this should go I can start working on a PR and we can work out the remaining issues there? -Daniel Smith On Jan 3, 2015, at 10:57 AM, Nathaniel

[Numpy-discussion] Optimizing multi-tensor contractions in numpy

2015-01-02 Thread Daniel Smith
Hello everyone, I have been working on a chunk of code that basically sets out to provide a single function that can take an arbitrary einsum expression and computes it in the most optimal way. While np.einsum can compute arbitrary expressions, there are two drawbacks to using pure einsum:

[Numpy-discussion] Faster np.triu_indices

2013-09-01 Thread Daniel Smith
Hello all, I was noticing that `np.triu_indices` took quite awhile and discovered it creates an upper triu array and then uses `np.where`. This seems quite inefficient and I was curious if something like the following would be better: def fast_triu_indices(dim,k=0): tmp_range =

[Numpy-discussion] average() or mean() errors

2007-01-26 Thread Daniel Smith
When calling the average() or mean() functions on a small array (3 numbers), I am seeing significant numerical errors (on the order of 1% with data to 8 significant digits). The code I am using is essentially: A = zeros(3) A[i] = X B = average(A) Is there something else I need to call to get