Re: [Numpy-discussion] Geometrically defined masking arrays; how to optimize?

2014-02-12 Thread Wolfgang Draxinger
On Tue, 11 Feb 2014 22:16:46 +0100 Daπid wrote: > Here it is an example: > > import numpy as np > import pylab as plt > > N = 100 > M = 200 > x, y = np.meshgrid(np.arange(N), np.arange(M)) > > # Center at 40, 70, radius 20 > x -= 40 > y -= 70 > out_circle = (x * x + y * y < 20**2) Neat. > No

[Numpy-discussion] Geometrically defined masking arrays; how to optimize?

2014-02-11 Thread Wolfgang Draxinger
Hi, I implemented the following helper function to create masking arrays: def gen_mask(self, ring, sector): in_segment = None if ring == 0: radius = self.scales()[0] def in_center_circle(xy): dx = xy[0] - self.xy[0]

[Numpy-discussion] Updating SciPy from 0.9.0 to 0.10.1 triggers undesired behavior in NumPy 1.6.2

2012-07-30 Thread Wolfgang Draxinger
Hi, first my apologies for crossposting this to two maillists, but as both projects are affected I think this is in order. Like the subject says I encountered some undesired behavior in the interaction of SciPy with NumPy. Using the "old" SciPy version 0.9.0 everything works fine and smooth. But