Robert, Zachary,
Thanks for the quick help. I tried to write a little self-contained example
of the crash, but it wasn't working. (I'm sure you've already figured out
how this ends.) When I tracked down why it wasn't working, I found my bug.
Turned out that cut, which I assumed was just a small s
> Help! I'm having a problem in searching through the *elements* if a
> 2d array. I have a loop over a numpy array:
>
> n,m = G.shape
> print n,m
> for i in xrange(n):
> for j in xrange(m):
> print type(G), type(G[i,j]), type(float(G[i,j]))
> g = float(
On Wed, Oct 27, 2010 at 15:58, Rick Muller wrote:
> Help! I'm having a problem in searching through the *elements* if a 2d
> array. I have a loop over a numpy array:
>
> n,m = G.shape
> print n,m
> for i in xrange(n):
> for j in xrange(m):
> print type(G), type(G[i,
Help! I'm having a problem in searching through the *elements* if a 2d
array. I have a loop over a numpy array:
n,m = G.shape
print n,m
for i in xrange(n):
for j in xrange(m):
print type(G), type(G[i,j]), type(float(G[i,j]))
g = float(abs(G[i,j]))
m 27.10.2010 02:02, schrieb Sebastian Walter:
> On Wed, Oct 27, 2010 at 12:59 AM, Pauli Virtanen wrote:
>> Tue, 26 Oct 2010 14:24:39 -0700, Nicolai Heitz wrote:
http://mail.scipy.org/mailman/listinfo/scipy-user
>>> I contacted them already but they didn't responded so far and I was
>>
attribute: 'true', 'false', '', ''
attributes: text, eol, core.autocrlf
filters: left alone.
core.safecrlf: left alone.
results.
normalise: True, False
workingdir_fmt: 'lf', 'crlf'
# Apply text.
# Can be skipped on check-out.
if text == 'true':
normalise = True
elif text == 'false':
nor
2010/10/27 Darren Dale :
> I'm losing interest myself. I don't think the issue is so complicated,
> there just seems to be a lot of confusing misinformation being posted
> here.
I apologise for all misinformation I posted. I always double-check
before sending. Believe me or not.
I think the sub
On Wed, Oct 27, 2010 at 11:31 AM, Friedrich Romstedt
wrote:
> Hi Darren,
>
> 2010/10/27 Darren Dale :
>>> So the svg changes must come from the 'fix' value for the whitespace action.
>>>
>>> I don't think it is a good idea to let whitespace be fixed by git and
>>> not by your editor :-) Or do you
2010/10/27 Charles R Harris :
> I'd like to do something here, but I'm waiting for a consensus and for
> someone to test things out, maybe with a test repo, to make sure things
> operate correctly. The documentation isn't that clear...
Okay, I'll do that tomorrow (in ~13 hr). I feel responsible.
On Wed, Oct 27, 2010 at 8:36 AM, Friedrich Romstedt
wrote:
> Hi Darren,
>
> 2010/10/19 Darren Dale :
>> I have the following set in my ~/.gitconfig file:
>>
>> [apply]
>> whitespace = fix
>>
>> [core]
>> autocrlf = input
>>
>> which is attempting to correct some changes in:
>>
On Wed, Oct 27, 2010 at 7:34 AM, Neal Becker wrote:
> I propose adding is_equal(a,b) function which does true short-ciruciting
You could use np.allclose, I guess. (It isn't short-circuiting right
now, but you could fix that.)
-- Nathaniel
___
NumPy-Dis
Pauli Virtanen wrote:
> Wed, 27 Oct 2010 09:44:59 -0400, Skipper Seabold wrote:
> [clip]
>> In [35]: timeit np.any(a!=b)
> [clip]
>> It seems to at least take less time when the difference is at the
>> "beginning," though I'm sure there could be exceptions.
>
> It performs all the comparisons to
On Wed, Oct 27, 2010 at 1:23 AM, Friedrich Romstedt
wrote:
> I found some issues on Mac OS X 10.5 ppc in py2.5.4:
>
> See here:
>
> http://github.com/friedrichromstedt/numpy/tree/release%2F1.5.1rc1%2Fpy2.5-python.org-macosx10.3/release/logs/osx105rh/
The inf/exp failures should be marked as known
On 10/27/2010 9:56 AM, Zachary Pincus wrote:
> the structure of the python language prevents
> meaningful short-circuiting in the case of
> np.any(a!=b)
Maybe:
any((ai != bi) for ai,bi in izip(a.flat,b.flat))
?
fwiw,
Alan Isaac
___
NumPy-Discussion mai
This is silly: the structure of the python language prevents
meaningful short-circuiting in the case of
np.any(a!=b)
While it's true that np.any itself may short-circuit, the 'a!=b'
statement itself will be evaluated in its entirety before the result
(a boolean array) is passed to np.any. Th
Wed, 27 Oct 2010 09:44:59 -0400, Skipper Seabold wrote:
[clip]
> In [35]: timeit np.any(a!=b)
[clip]
> It seems to at least take less time when the difference is at the
> "beginning," though I'm sure there could be exceptions.
It performs all the comparisons to create a temporary boolean array.
an
On Wed, Oct 27, 2010 at 9:37 AM, Johann Cohen-Tanugi
wrote:
>
>
> On 10/27/2010 03:31 PM, Neal Becker wrote:
>> Johann Cohen-Tanugi wrote:
>>
>>
>>> how about np.any(a!=b) ??
>>>
>>> On 10/27/2010 12:25 PM, Neal Becker wrote:
>>>
Is there a way to get a short circuit != ?
That is,
On 10/27/2010 03:31 PM, Neal Becker wrote:
> Johann Cohen-Tanugi wrote:
>
>
>> how about np.any(a!=b) ??
>>
>> On 10/27/2010 12:25 PM, Neal Becker wrote:
>>
>>> Is there a way to get a short circuit != ?
>>>
>>> That is, compare 2 arrays but stop as soon as the first element
>>> compar
Hi,
I find this a bit misleading:
>>> a = np.arange(10)
>>> a[np.array(0)]
0
>>> a[np.array([0])]
array([0])
>>> a[[0]]
array([0])
But, for regular python lists we have:
>>> l = a.tolist()
>>> l[np.array(0)]
0
>>> l[np.array([0])]
0
i.e. indexing with a rank-0 array and a rank-1 array wit
Johann Cohen-Tanugi wrote:
> how about np.any(a!=b) ??
>
> On 10/27/2010 12:25 PM, Neal Becker wrote:
>> Is there a way to get a short circuit != ?
>>
>> That is, compare 2 arrays but stop as soon as the first element
>> comparison fails?
>>
>> I'm assuming that np.all (a != b) will _not_ do thi
how about np.any(a!=b) ??
On 10/27/2010 12:25 PM, Neal Becker wrote:
> Is there a way to get a short circuit != ?
>
> That is, compare 2 arrays but stop as soon as the first element comparison
> fails?
>
> I'm assuming that np.all (a != b) will _not_ do this, but will first compare
> all elements
Hi Darren,
2010/10/19 Darren Dale :
> I have the following set in my ~/.gitconfig file:
>
> [apply]
> whitespace = fix
>
> [core]
> autocrlf = input
>
> which is attempting to correct some changes in:
>
> branding/icons/numpylogo.svg
> branding/icons/numpylogoicon.svg
> tools/w
Is there a way to get a short circuit != ?
That is, compare 2 arrays but stop as soon as the first element comparison
fails?
I'm assuming that np.all (a != b) will _not_ do this, but will first compare
all elements.
___
NumPy-Discussion mailing list
Tue, 26 Oct 2010 22:05:52 -0700, Mark Wiebe wrote:
> Because writing "arr.ravel('F')" doesn't seem as descriptive as
> "arr.ravel(order='F')", I wrote this simple patch. I added mention of
> the order='A' parameter to a few places it is relevant as well. Here's
> the branch on github:
>
> http:/
On Wed, Oct 27, 2010 at 12:59 AM, Pauli Virtanen wrote:
> Tue, 26 Oct 2010 14:24:39 -0700, Nicolai Heitz wrote:
>> > http://mail.scipy.org/mailman/listinfo/scipy-user
>>
>> I contacted them already but they didn't responded so far and I was
>> forwarded to that list which was supposed to be more
25 matches
Mail list logo