On Fri, Mar 4, 2011 at 4:19 PM, Choy matthew.i...@gmail.com wrote:
Hello --
I recently upgraded from python 2.6 - 2.7, cython 0.13 - 14.1, and
numpy 1.4.1 - 1.5.1. Unfortunately, one of my cython modules no
longer works.
I tracked my bug and used the web to see that there is already a
Tue, 08 Mar 2011 00:12:35 -0800, Robert Bradshaw wrote:
[clip]
Unfortunately, I don't think anyone's actively working on it right now.
It's probably a superficial fix for someone who knows NumPy and Cython
decently well, but I have no idea myself (not having looked that deeply
into it.) Does
On Mon, 7 Mar 2011 23:07:32 -0500, Dan Halbert halb...@halwitz.org wrote:
On 3/7/2011 9:25 PM, Nathaniel Smith wrote:
On Mon, Mar 7, 2011 at 3:36 PM, Dan Halberthalb...@halwitz.org wrote:
Or is there some higher-level compiled array language that looks something
like NumPy code?
You
Hi
I am having an issue with boolean slicing. it seems to work fine for
reading a value, but I can use it to set a value:
import numpy
b = numpy.array([[1,2],[3,4],[5,6],[7,8],[9,10]])
m = numpy.array([0,1,0,0,0], dtype=bool)
print b[m]
print b[m][0,0]
b[m][0,0] = -1
print b[m][0,0]
I think
Hi,
I am pleased to announce a new release of bento, a packaging
solution for
python which aims at reproducibility, extensibility and simplicity. You can
take a look at its main features on bento's main documentation page
(http://cournape.github.com/Bento). The main features of this 0.0.5
Den 08.03.2011 05:05, skrev Dan Halbert:
Thanks, that's a good suggestion. I have not written Fortran since 1971,
but it's come a long way. I was a little worried about the row-major vs
column-major issue, but perhaps that can be handled just by remembering
to reverse the subscript order
Den 08.03.2011 14:59, skrev Sam Tygier:
I think the boolean slicing is making a copy instead of a view.
Yes.
is there
a way around this?
A boolean slice cannot be indexed with the dot product of dimensions
and strides, hence the copy.
You probably want to use masked arrays instead.
Sturla
2011-03-08 14:29:07 GMT, Sturla Molden:
A boolean slice cannot be indexed with the dot product of dimensions
and strides, hence the copy.
You probably want to use masked arrays instead.
Masked array does not seem to help. when i do:
am = numpy.ma.array(a, mask=a[n]['name']==foo)
am['x'] += 1
On Tue, Mar 8, 2011 at 07:59, Sam Tygier
sam.tyg...@hep.manchester.ac.uk wrote:
Hi
I am having an issue with boolean slicing. it seems to work fine for
reading a value, but I can use it to set a value:
import numpy
b = numpy.array([[1,2],[3,4],[5,6],[7,8],[9,10]])
m =
Or just with a dot:
===
In [17]: np.tensordot(weights, matrices, (0,0))
Out[17]:
array([[ 5., 5., 5.],
[ 5., 5., 5.]])
In [18]: np.dot(matrices.T,weights).T
Out[18]:
array([[ 5., 5., 5.],
[ 5., 5., 5.]])
==
make matrices.T C_CONTIGUOUS for maximum speed.
-n
On Mon, Mar
Hello,
I am writing a small PDE code in Python using a Cartesian mesh. Each mesh
cell is one of a few materials, with associated properties. I store these
properties in a dictionary and have a mesh map that tells me which
material is in each cell.
At some point in my code, I need to do a
I am wanting to use an array b to index into an array x with dimension
bigger by 1 where the element of b indicates what value to extract
along a certain direction. For example, b = x.argmin(axis=1).
Perhaps I want to use b to create x.min(axis=1) but also to index
perhaps another array of the
On Tue, Mar 8, 2011 at 3:03 PM, Jonathan Taylor
jonathan.tay...@utoronto.ca wrote:
I am wanting to use an array b to index into an array x with dimension
bigger by 1 where the element of b indicates what value to extract
along a certain direction. For example, b = x.argmin(axis=1).
Perhaps I
On Mar 8, 2011, at 11:56 AM, Josh Hykes wrote:
At some point in my code, I need to do a cell-wise multiplication of the
properties with a state variable. The ideal method would (1) be fast (no
Python loops) and (2) not waste memory constructing an entire property map.
My best attempt using
I think the documentation for np.linalg.pinv contains some inaccuracies.
Most importantly, Moore-Penrose is not defined by the solution to the
least-square
problem. It was defined by the unique solution to 4 equations. Since SVD
can be easily shown to satisfy the same 4 equations, it is the
On Sun, Mar 6, 2011 at 11:12 PM, Ralf Gommers
ralf.gomm...@googlemail.com wrote:
On Sun, Mar 6, 2011 at 1:10 AM, Skipper Seabold jsseab...@gmail.com wrote:
On Sat, Mar 5, 2011 at 9:28 AM, Ralf Gommers
ralf.gomm...@googlemail.com wrote:
On Sat, Mar 5, 2011 at 8:09 AM, Russell E. Owen
First consider this example of column_stack
import numpy as np
x = np.random.random((5,1))
y = np.random.random((5,3))
arr = np.column_stack((x[[]], y))
# this fails which is expected
arr = np.column_stack((x[:,[]], y))
# this happily works I guess because
x[:,[]]
# array([], shape=(5, 0),
17 matches
Mail list logo