2 Dec 00:25
Re: "fancy index" assignment
Travis Oliphant <oliphant.travis <at> ieee.org>
2006-12-01 23:25:15 GMT
2006-12-01 23:25:15 GMT
Johannes Loehnert wrote: > Hi, > > I have a problem with fancy assignment. Even though left and right side > of the assignment have the same shape, an exception occurs. numpy is freshly > built 10 minutes ago. > This is a bug in NumPy. I've tracked it down and am trying to come up with a fix. Basically, I need to figure out the transpose tuple to use to invert a permutation that I'm using. If I do. b = a.transpose(perm) c = b.transpose(what) so that c and a have the same shape. I have a general formula for perm but I'm not quite sure how to translate that into a general formula for what. I may have to just calculate the inverse permutation in the code. -Travis.
RSS Feed