Re: [Numpy-discussion] PyData Barcelona this May

2017-03-21 Thread Daπid
On 20 March 2017 at 19:58, Jaime Fernández del Río wrote: > > Taking NumPy In Stride > This workshop is aimed at users already familiar with NumPy. We will dissect > the NumPy memory model with the help of a very powerful abstraction: > strides. > Participants will learn how

Re: [Numpy-discussion] Move docs to Github?

2017-03-15 Thread Daπid
What about readthedocs? I haven't seen any explicit limit in traffic. On 15 March 2017 at 16:33, Matthew Brett wrote: > Hi, > > On Wed, Mar 15, 2017 at 2:47 AM, Ralf Gommers wrote: >> >> >> On Wed, Mar 15, 2017 at 3:21 PM, Matthew Brett

Re: [Numpy-discussion] ANN: NumExpr3 Alpha

2017-02-17 Thread Daπid
This is very nice indeed! On 17 February 2017 at 12:15, Robert McLeod wrote: > * bytes and unicode support > * reductions (mean, sum, prod, std) I use both a lot, maybe I can help you get them working. Also, regarding "Vectorization hasn't been done yet with cmath

Re: [Numpy-discussion] array comprehension

2016-11-04 Thread Daπid
On 4 November 2016 at 16:04, Stephan Hoyer wrote: > > But, we also don't have an unstack function. This would mostly be syntactic > sugar, but I think it would be a nice addition. Such a function actually > exists in TensorFlow: >

Re: [Numpy-discussion] Multi-distribution Linux wheels - please test

2016-02-09 Thread Daπid
On 8 February 2016 at 20:25, Matthew Brett wrote: > > I used the latest release, v0.2.15: > > > > Is there a later version that we should try? > > Cheers, > That is the one in the Fedora

Re: [Numpy-discussion] resizeable arrays using shared memory?

2016-02-09 Thread Daπid
On 6 February 2016 at 23:56, Elliot Hallmark wrote: > Now, I would like to have these arrays shared between processes spawned via > multiprocessing (for fast interprocess communication purposes, not for > parallelizing work on an array). I don't care about mapping to a

Re: [Numpy-discussion] Linking other libm-Implementation

2016-02-09 Thread Daπid
On 8 February 2016 at 18:36, Nathaniel Smith wrote: > I would be highly suspicious that this speed comes at the expense of > accuracy... My impression is that there's a lot of room to make > speed/accuracy tradeoffs in these functions, and modern glibc's libm has > seen a fair

Re: [Numpy-discussion] Multi-distribution Linux wheels - please test

2016-02-08 Thread Daπid
On 6 February 2016 at 21:26, Matthew Brett wrote: > > pip install -f numpy scipy > python -c 'import numpy; numpy.test()' > python -c 'import scipy; scipy.test()' > All the tests pass on my Fedora 23 with Python 2.7, but it seems

Re: [Numpy-discussion] Downstream integration testing

2016-01-31 Thread Daπid
On 31 Jan 2016 13:08, "Pauli Virtanen" wrote: > For example, automated test rig that does the following: > > - run tests of a given downstream project version, against > previous numpy version, record output > > - run tests of a given downstream project version, against > numpy

Re: [Numpy-discussion] array_equal too strict?

2015-12-17 Thread Daπid
On 17 December 2015 at 14:43, Nico Schlömer wrote: > I'm not sure where I'm going wrong here. Any hints? You are dancing around the boundary between close floating point numbers, and when you are dealing with ULPs, number of decimal places is a bad measure. Working

Re: [Numpy-discussion] performance solving system of equations in numpy and MATLAB

2015-12-17 Thread Daπid
On 16 December 2015 at 18:59, Francesc Alted wrote: > Probably MATLAB is shipping with Intel MKL enabled, which probably is the > fastest LAPACK implementation out there. NumPy supports linking with MKL, > and actually Anaconda does that by default, so switching to Anaconda

Re: [Numpy-discussion] Build broken

2015-12-15 Thread Daπid
On 15 December 2015 at 07:25, Jaime Fernández del Río wrote: > Can anyone who actually knows what Travis is doing take a look at the log: > > > I don't claim to understand what is happening there, but I believe the function

Re: [Numpy-discussion] loadtxt and usecols

2015-11-10 Thread Daπid
On 10 November 2015 at 16:07, Irvin Probst wrote: > I know this new behavior might break a lot of existing code as > usecol=(42,) used to return a 1-D array, but usecol=42, also > returns a 1-D array so the current behavior is not consistent imho.

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-10-06 Thread Daπid
On 30 September 2015 at 18:20, Nathaniel Smith wrote: > - parallel code in general is not very composable. If someone is calling a > numpy operation from one thread, great, transparently using multiple > threads internally is a win. If they're exploiting some higher-level >

Re: [Numpy-discussion] Numpy 1.10.0 release

2015-10-06 Thread Daπid
I don't get any failures on Fedora 22. I have installed it with pip, setting my CFLAGS to "-march=core-avx-i -O2 -pipe -mtune=native" and linking against openblas. With the new Numpy, Scipy full suite shows two errors, I am sorry I didn't think of running that in the RC phase:

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-10-02 Thread Daπid
On 2 October 2015 at 11:58, Juha Jeronen wrote: > >> > First version done and uploaded: > > > > Small comment: now you are checking if the input is a scalar or a ndarray, but it should

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-10-02 Thread Daπid
On 1 October 2015 at 09:05, Nathaniel Smith wrote: > > >> - gcc + OpenMP on linux still breaks multiprocessing. There's a patch to > >> fix this but they still haven't applied it; alternatively there's a > >> workaround you can use in multiprocessing (not using fork mode), but >

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-10-01 Thread Daπid
On 30 September 2015 at 18:20, Nathaniel Smith <> wrote: > On Sep 30, 2015 2:28 AM, "Daπid" <> wrote: > [...] > > Is there a nice way to ship both versions? After all, most > implementations of BLAS and friends do spa

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-09-30 Thread Daπid
On 30 September 2015 at 10:20, Juha Jeronen wrote: > > Are we putting Cuthon in Numpy now? I lost track. >> > > I thought so? But then again, I'm just a user :) As of this moment, there are three Cython modules in Numpy, so yes. Releases ship the C generated modules, so it

Re: [Numpy-discussion] ANN: Numpy 1.10.0rc1 released.

2015-09-24 Thread Daπid
On 24 September 2015 at 09:17, Jens Jørgen Mortensen wrote: > > >>> np.vdot(a[:, :, 0], b[:, :, 0]).real > 84.0 > >>> np.__version__ > '1.10.0rc1' > > The result should be 42. This is on Ubuntu 15.04. I can reproduce on Fedora with Numpy linked against Openblas. Numpy 1.9

Re: [Numpy-discussion] Backwards-incompatible improvements to numpy.random.RandomState

2015-05-25 Thread Daπid
On 24 May 2015 at 22:30, Sturla Molden wrote: Personally I think we should only make guarantees about the data types, array shapes, and things like that, but not about the values. Those who need a particular version of NumPy for exact reproducibility should install the

Re: [Numpy-discussion] np.diag(, B))

2015-05-22 Thread Daπid
On 22 May 2015 at 12:15, Mathieu Blondel wrote: Right now I am using np.sum(A * B.T, axis=1) for dense data and I have implemented a Cython routine for sparse data. I haven't benched np.sum(A * B.T, axis=1) vs. np.einsum(ij,ji-i, A, B) yet since I am mostly interested in

Re: [Numpy-discussion] Introductory mail and GSoc Project Vector math library integration

2015-03-11 Thread Daπid
On 11 March 2015 at 16:51, Dp Docs wrote: On Wed, Mar 11, 2015 at 7:52 PM, Sturla Molden wrote: ​Hi sturla, Thanks for suggestion.​ There are several vector math libraries NumPy could use, e.g. MKL/VML, Apple Accelerate (vecLib), ACML, and

Re: [Numpy-discussion] dot and MKL memory

2015-02-27 Thread Daπid
On 27 February 2015 at 17:50, Charles R Harris wrote: No, but I don't know why that is happening with MKL. Can anyone else reproduce this? Chuck I can't reproduce. I have checked on my system python (ATLAS) and Conda with MKL running in parallel with vmstat. The

Re: [Numpy-discussion] Using numpy on hadoop streaming: ImportError: cannot import name multiarray

2015-02-11 Thread Daπid
On 11 February 2015 at 08:06, Kartik Kumar Perisetla wrote: Thanks David. But do I need to install virtualenv on every node in hadoop cluster? Actually I am not very sure whether same namenodes are assigned for my every hadoop job. So how shall I proceed on such scenario.

Re: [Numpy-discussion] Using numpy on hadoop streaming: ImportError: cannot import name multiarray

2015-02-10 Thread Daπid
On 11 February 2015 at 03:38, Kartik Kumar Perisetla wrote: Also, I don't have root access thus, can't install numpy or any other package on cluster You can create a virtualenv, and install packages on it without needing root access. To minimize trouble, you can ensure it

Re: [Numpy-discussion] Any interest in a 'heaviside' ufunc?

2015-02-04 Thread Daπid
On 4 February 2015 at 11:05, Sturla Molden wrote: On 04/02/15 06:18, Warren Weckesser wrote: By discrete form, do you mean discrete time (i.e. a function defined on the integers)? Then I agree, the discrete time unit step function is defined as It is the cumulative

Re: [Numpy-discussion] Sorting refactor

2015-01-16 Thread Daπid
On 16 January 2015 at 13:15, Eelco Hoogendoorn wrote: Perhaps an algorithm can be made faster, but often these multicore algorithms are also less efficient, and a less data-dependent way of putting my cores to good use would have been preferable. Potentially, other

Re: [Numpy-discussion] Characteristic of a Matrix.

2015-01-05 Thread Daπid
On 5 January 2015 at 20:40, Colin J. Williams wrote: This illustrates a failure, which is reported later in the calculation: A2= np.matrix([[1, 2, -2], [-3, -1, 4], [4, 2 -6]]) Here 2 - 6 is treated as an expression. There should be a comma between 2 and -6. The

Re: [Numpy-discussion] median filtering a masked array

2014-11-06 Thread Daπid
On 5 November 2014 19:11, Moroney, Catherine M (398E) wrote: What is the recommended way of doing a fast median filter on an array where only certain elements of the array need to be calculated? I'm trying to avoid a nested loop over all (I,J) elements.

Re: [Numpy-discussion] FFTS for numpy's FFTs (was: Re: Choosing between NumPy and SciPy functions)

2014-10-29 Thread Daπid
On 29 October 2014 10:48, Eelco Hoogendoorn wrote: My point isn't about speed; its about the scope of numpy. typing np.fft.fft isn't more or less convenient than using some other symbol from the scientific python stack. The problem is in distribution. For many

Re: [Numpy-discussion] higher accuracy in diagonialzation

2014-10-27 Thread Daπid
On 27 October 2014 09:37, Sunghwan Choi wrote: One of them is inaccurate or both two of them are inaccurate within that range. Which one is more accurate? You can check it yourself using the eigenvectors. The cosine distance between v and will give you the

Re: [Numpy-discussion] Memory efficient alternative for np.loadtxt and np.genfromtxt

2014-10-26 Thread Daπid
On 26 October 2014 12:54, Jeff Reback wrote: you should have a read here/ going below the 2x memory usage on read in is non trivial and costly in terms of performance If you know in advance the number of rows (because it is in the

Re: [Numpy-discussion] numpy log and exceptions

2014-10-22 Thread Daπid
On 22 October 2014 15:43, Nathaniel Smith wrote: I guess we could make this more consistent by hand if we wanted - isnan is pretty cheap? Can it be made avoiding storing the full bool array? The 1/8 memory overhead can be problematic for large arrays.

Re: [Numpy-discussion] [SciPy-Dev] Hamming etc. windows are wrong

2014-09-26 Thread Daπid
On 26 September 2014 10:41, Jerry wrote: I am just learning Python-NumPy-SciPy but it appears as though the SciPy situation is that the documentation page above *** mentions the flag but the flag has not been implemented into SciPy itself. I would be glad to stand

Re: [Numpy-discussion] numpy ignores OPT/FOPT under Python3

2014-09-10 Thread Daπid
On 9 September 2014 17:23, Thomas Unterthiner wrote: I want to use the OPT/FOPT environment viariables to set compiler flags when compiling numpy. However it seems that they get ignored under python3. Using Ubuntu 14.04 and numpy 1.9.0, I did the following: export

Re: [Numpy-discussion] Does a `mergesorted` function make sense?

2014-08-27 Thread Daπid
On 27 August 2014 19:02, Jaime Fernández del Río wrote: Since there is at least one other person out there that likes it, is there any more interest in such a function? If yes, any comments on what the proper interface for extra output should be? Although perhaps the best

Re: [Numpy-discussion] numpy.mean still broken for largefloat32arrays

2014-07-28 Thread Daπid
On 28 July 2014 14:46, Sebastian Berg wrote: To rephrase my most pressing question: may np.ones((N,2)).mean(0) and np.ones((2,N)).mean(1) produce different results with the implementation in the current master? If so, I think that would be very much regrettable;

Re: [Numpy-discussion] Short-hand array creation in `numpy.mat` style

2014-07-13 Thread Daπid
On 11 July 2014 22:30, Daniel da Silva wrote: I think the idea at hand is not that it would be used everyday, but it would be there when needed. What people do everyday is with *real* data. They are using functions to load the data. But sometimes we have to

Re: [Numpy-discussion] Short-hand array creation in `numpy.mat` style

2014-07-07 Thread Daπid
On 7 July 2014 08:48, Jacco Hoekstra - LR wrote: How about using the old name np.mat() for this type of array creation? How about a new one? np.matarray, for MATLAB array. /David. ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] Cython requirement?

2014-07-06 Thread Daπid
On 6 July 2014 20:40, Benjamin Root wrote: When did Cython become a build requirement? I remember discussing the use of Cython a while back, and IIRC the agreement was that both the cython code and the generated C files would be included in version control so that cython

Re: [Numpy-discussion] Switch to using ATLAS for OSX binary wheels

2014-06-13 Thread Daπid
On 13 June 2014 18:00, Ralf Gommers wrote: pip install numpy[mkl] ? I think that's possible. MKL are fairly famous, but perhaps it would be legally safer to use [mkl-nonfree] (or something of the sort) to signal the licence. But maybe I am bikeshedding here.

Re: [Numpy-discussion] fftw supported?

2014-06-05 Thread Daπid
On 4 June 2014 23:34, Alexander Eberspächer wrote: If you feel pyfftw bothers you with too many FFTW details, you may try something like (be careful, it's a hack that has seen only little testing). pyFFTW

Re: [Numpy-discussion] numpy quad and maple

2014-05-10 Thread Daπid
On 10 May 2014 01:04, Ihab Riad wrote: Hi, I did the following integral with numpy quad quad(lambda h: np.exp(-.5*2334.0090702455204-1936.9610182100055*5*log10(h)-(12.5*2132.5498892927189)*log10(h)*log10(h)),0,inf) and I get the following values (1.8368139214123403e-126,

Re: [Numpy-discussion] index partition

2014-04-15 Thread Daπid
On 14 April 2014 18:17, Alan G Isaac wrote: I find it rather more convenient to use boolean arrays, but I wonder if arrays of indexes might have other advantages (which would suggest using the set operations instead). In particular, might a[boolean_array] be slower that

Re: [Numpy-discussion] match RNG numbers with R?

2014-04-07 Thread Daπid
On Apr 7, 2014 3:59 AM, Yaroslav Halchenko wrote: so I would assume that the devil is indeed in R post-processing and would look into it (if/when get a chance). The devil here is the pigeon and the holes problem. Mersenne Twister generates random integers in a certain

Re: [Numpy-discussion] Standard Deviation (std): Suggested change for ddof default value

2014-04-04 Thread Daπid
On 2 April 2014 16:06, Sturla Molden wrote: wrote: pandas came later and thought ddof=1 is worth more than consistency. Pandas is a data analysis package. NumPy is a numerical array package. I think ddof=1 is justified for Pandas, for

Re: [Numpy-discussion] Where to put versionadded

2014-04-04 Thread Daπid
On Apr 4, 2014 8:54 PM, Charles R Harris wrote: On Fri, Apr 4, 2014 at 12:48 PM, wrote: On Fri, Apr 4, 2014 at 2:12 PM, Charles R Harris wrote: Hi All, Currently there are several placements of the '..

Re: [Numpy-discussion] argsort speed

2014-02-16 Thread Daπid
On 16 February 2014 23:43, wrote: What's the fastest argsort for a 1d array with around 28 Million elements, roughly uniformly distributed, random order? On numpy latest version: for kind in ['quicksort', 'mergesort', 'heapsort']: print kind %timeit np.sort(data,

Re: [Numpy-discussion] argsort speed

2014-02-16 Thread Daπid
On 17 February 2014 00:12, Daπid wrote: I seem unable to find the code for ndarray.sort, so I can't check. I have tried to grep it tring all possible combinations of def ndarray, self.sort, etc. Where is it? Nevermind, it is in core/src/multiarray/methods.c

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

2014-02-11 Thread Daπid
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) out_ring = out_circle - (x * x + y * y 10**2) plt.imshow(out_circle) plt.figure()

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

2014-02-11 Thread Daπid
(out_circle) plt.figure() plt.imshow(out_ring) Using sparse you can avoid the repetition of the arrays, getting the same functionality. Also, if the image is big, you can delegate the computations of out_circle and out_ring to numexpr for speed. /David. On 11 February 2014 22:16, Daπid

Re: [Numpy-discussion] Fast decrementation of indices

2014-02-03 Thread Daπid
On 2 February 2014 20:58, Mads Ipsen wrote: ie. bond 0 connects atoms 0 and 5, bond 1 connects atom 0 and 6, etc. In practical examples, the list can be much larger (N 100.000 connections. Perhaps you should consider an alternative approach. You could consider it a

Re: [Numpy-discussion] Catching out-of-memory error before it happens

2014-01-25 Thread Daπid
On 24 January 2014 23:09, Dinesh Vadhia wrote: Francesc: Thanks. I looked at numexpr a few years back but it didn't support array slicing/indexing. Has that changed? No, but you can do it yourself. big_array = np.empty(2) piece = big_array[30:-50]

Re: [Numpy-discussion] using loadtxt to load a text file in to a numpy array

2014-01-15 Thread Daπid
On 15 January 2014 11:12, Hedieh Ebrahimi hedieh.ebrah...@amphos21.comwrote: I try to print my fileContent array after I read it and it looks like this : [b'C:UsersDocumentsProjectmytextfile1.txt' b'C:UsersDocumentsProjectmytextfile2.txt'

Re: [Numpy-discussion] adding fused multiply and add to numpy

2014-01-09 Thread Daπid
On 8 January 2014 22:39, Julian Taylor jtaylor.deb...@googlemail.comwrote: As you can see even without real hardware support it is about 30% faster than inplace unblocked numpy due better use of memory bandwidth. Its even more than two times faster than unoptimized numpy. I have an i5, and

Re: [Numpy-discussion] nasty bug in 1.8.0??

2013-12-02 Thread Daπid
I get: In [4]: x.strides Out[4]: (8,) Same architecture and OS, Numpy installed via Pip on Python 2.7.5. On 2 December 2013 20:08, Neal Becker wrote: This is np 1.8.0 on fedora x86_64: In [5]: x =np.array ((1,)) In [6]: x.shape Out[6]: (1,) In [7]: x.strides

Re: [Numpy-discussion] numpy vbench-marking, compiler comparison

2013-11-26 Thread Daπid
Have you tried on an Intel CPU? I have both a i5 quad core and an i7 octo core where I could run it over the weekend. One may expect some compiler magic taking advantage of the advanced features, specially the i7. /David On Nov 25, 2013 8:16 PM, Julian Taylor wrote:

[Numpy-discussion] RuntimeWarning raised in the wrong line

2013-11-20 Thread Daπid
I have the following code, operating on some arrays. pen = 1 - (real_sum[int(i1 + t)]) / (absolute[int(i1 + t)]) if np.isnan(pen): pen = 0.0 I know that, sometimes, real_sum and absolute are 0 at the designated point, so I should get a RuntimeWarning. But, the warning is

Re: [Numpy-discussion] savetxt fmt argument fails when using a unicode string

2013-11-14 Thread Daπid
On 14 November 2013 09:25, Pierre Haessig wrote: Le 13/11/2013 17:54, Daπid a écrit : np.savetxt('a.csv', [1], fmt=str('%.3f')) Thanks, that's what I did too. I'm just still wondering whether there is a cleaner solution... I have a fix, I am submitting a PR

Re: [Numpy-discussion] Precision/value change moving from C to Python

2013-11-13 Thread Daπid
On 13 November 2013 02:40, Bart Baker wrote: That is the order of the machine epsilon for double, that looks like roundoff errors to me. I'm trying to my head around this. So does that mean that neither of them is right, that it is just the result of doing the same

Re: [Numpy-discussion] savetxt fmt argument fails when using a unicode string

2013-11-13 Thread Daπid
The following works on Numpy 1.8.0: from __future__ import unicode_literals import numpy as np np.savetxt('a.csv', [1], fmt=str('%.3f')) Without the str, I get a clearer error: Traceback (most recent call last): File, line 4, in module np.savetxt('a.csv', [1], fmt='%.3f') File

Re: [Numpy-discussion] Precision/value change moving from C to Python

2013-11-12 Thread Daπid
On 12 November 2013 12:01, Bart Baker wrote: The issue is that there are some minor (10^-16) differences in the values when I do the calculation in C vs Python. That is the order of the machine epsilon for double, that looks like roundoff errors to me. I found similar

Re: [Numpy-discussion] memmory management question

2013-10-28 Thread Daπid
On 28 October 2013 03:13, Georgios Exarchakis wrote: If yes then how do you release memorry by slicing away parts of an array? An array is a single Python object. In your example, there is always one reference pointing to the array (either the whole array or only a view),

Re: [Numpy-discussion] 1.8.0rc1

2013-10-01 Thread Daπid
On 30 September 2013 17:17, Charles R Harris charlesr.har...@gmail.comwrote: NumPy 1.8.0rc1 is up now on sourceforge binary builds are included except for Python 3.3 on windows, which will arrive later. Many thanks to Ralf for

Re: [Numpy-discussion] 1.8.0rc1

2013-10-01 Thread Daπid
Disregard that, I had not cleaned the previous installation properly. Sorry for the noise. On 1 October 2013 12:11, Daπid wrote: On 30 September 2013 17:17, Charles R Harris charlesr.har...@gmail.comwrote: NumPy 1.8.0rc1 is up now on sourceforgehttp

Re: [Numpy-discussion] Valid algorithm for generating a 3D Wiener Process?

2013-09-27 Thread Daπid
On 26 September 2013 10:02, Daπid wrote: The simplest way is to do it in cartesian coordinates: take x, y, and z independently from N(0,1). If you want to generate only one normal number per step, consider the jacobian in the angles. Actually, this is wrong

Re: [Numpy-discussion] Valid algorithm for generating a 3D Wiener Process?

2013-09-26 Thread Daπid
On 25 September 2013 19:41, David Goldsmith wrote: the 'angles' that describe the position undergo a random walk [actually, it would seem that they don't, since they too fail the varying-as-white-noise test], so the particle tends to move in the same direction over

Re: [Numpy-discussion] Really cruel draft of vbench setup for NumPy (.add.reduce benchmarks since 2011)

2013-09-06 Thread Daπid
On 6 September 2013 21:21, Yaroslav Halchenko wrote: some old ones are still there, some might be specific to my CPU here How long does one run take? Maybe I can run it in my machine (Intel i5) for comparison. ___

Re: [Numpy-discussion] Stick intersection path algorithm

2013-09-05 Thread Daπid
On 5 September 2013 13:14, Josè Luis Mietta 2. Using networkx or other tool: how can I obtain the 'clusters size' distribution (that is: number of clusters of size 'D', for all cluster-sizes)? This is best asked in their mailing list. A possible way is:

Re: [Numpy-discussion] Stick intersection path algorithm

2013-09-05 Thread Daπid
On 5 September 2013 17:03, Josè Luis Mietta The array ([ 0, 39, 7, 3, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1]) means that in the sistem (graph) are : 4 cluster of size 1, one cluster of size 3, one cluster of size 7 and one cluste of

Re: [Numpy-discussion] ANN: Numpy 1.8.0 beta 1 release

2013-09-01 Thread Daπid
On 1 September 2013 18:54, Charles R Harris charlesr.har...@gmail.comwrote: I'm happy to announce the first beta release of Numpy 1.8.0. Please try this beta and report any issues on the numpy-dev mailing list. In an old thread there was discussion about adding minmax and sincos; is there a

Re: [Numpy-discussion] Stick intersection path algorithm

2013-09-01 Thread Daπid
On 2 September 2013 02:50, Josè Luis Mietta I wanna see if two line segments are connected by a path formed by line segments intersected. You could build a network where each segment is a node and an intersection is a link. Then, you could use NetworkX

Re: [Numpy-discussion] RAM problem during code execution - Numpya arrays

2013-08-23 Thread Daπid
On 23 August 2013 16:59, Benjamin Root wrote: A lot of the code you have here can be greatly simplified. I would start with just trying to get rid of appends as much as possible and use preallocated arrays with np.empty() or np.ones() or the likes. Also, if you don't know

Re: [Numpy-discussion] Reading footer lines

2013-08-13 Thread Daπid
On 13 August 2013 14:20, Resmi wrote: As a workaround, I've tried using os.system along with grep. And I get the following output : os.system(grep -e 'tx' 'data.dat' ) ## tx =2023.06 0 Why is there a 0 in the output? The file has no blank lines. That 0 corresponds

Re: [Numpy-discussion] add .H attribute?

2013-07-24 Thread Daπid
An idea: If .H is ideally going to be a view, and we want to keep it this way, we could have a .h() method with the present implementation. This would preserve the name .H for the conjugate view --when someone finds the way to do it. This way we would increase the readability, simplify some

Re: [Numpy-discussion] numpy.filled, again

2013-06-12 Thread Daπid
On 12 June 2013 17:29, wrote: +2 on this. I like a good name like `filled` for a function that I expect to use regularly. it's short and descriptive. FTIW, I am for this one too. That is not only clear, but a name that one may try even before checking the docs.

Re: [Numpy-discussion] Avoiding messy code in Python

2013-06-12 Thread Daπid
On 12 June 2013 18:27, Chris Barker - NOAA Federal wrote: without documentation and testing. This one is easy: add documentation and testing! This lecture may help you. It uses unittest, though, but the idea is applicable to whatever system you use:

Re: [Numpy-discussion] About speed vs math...

2013-06-03 Thread Daπid
On 3 June 2013 08:33, David Cournapeau wrote: (around 50 on my own machine, but that's platform specific). In my machine, it is around 10. You also have to be aware of the data container: it is not the same to iterate over lists than over arrays. In [6]: a = np.arange(50)

Re: [Numpy-discussion] Name change of the ptp() function

2013-05-10 Thread Daπid
On May 10, 2013 3:18 PM, Robert Kern wrote: Sure, it's probably more readable I am not sure of it. I would have to check the docs to see what it means. The mathematical term is range, but it already has a meaning in Python, so it is not a good way to go, being perhaps

Re: [Numpy-discussion] printing array in tabular form

2013-05-09 Thread Daπid
On 9 May 2013 10:06, Sudheer Joseph wrote: However writing a formatted out put looks to be bit tricky with python relative to other programing languages. If performance is not an issue, you could do it by hand, as you can always do in any programming language:

Re: [Numpy-discussion] Really cruel draft of vbench setup for NumPy (.add.reduce benchmarks since 2011)

2013-05-07 Thread Daπid
On 7 May 2013 13:47, Sebastian Berg wrote: Indexing/assignment was the first thing I thought of too (also because fancy indexing/assignment really could use some speedups...). Other then that maybe some timings for small arrays/scalar math, but that might be nice for

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Daπid
On 1 May 2013 03:36, Benjamin Root wrote: Are there any other functions that others feel are missing from numpy and would like to see for v1.8? Let's discuss them here. I would like to have sincos, to compute sin and cos of the same number faster. According to some benchmarks,

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Daπid
On 1 May 2013 17:13, Todd wrote: Speaking of which, I think there should be a function to construct a complex array out of two identically-shaped floating-point arrays, as well as perhaps an np.i class that converts a real array to an imaginary one (using __mul__ and such).

Re: [Numpy-discussion] GSoC proposal -- Numpy SciPy

2013-05-01 Thread Daπid
On 1 May 2013 20:12, Blake Griffith wrote: However, it would still be useful to have ufuncs working well with the sparse package. How are you planning to deal with ufunc(0) != 0? cos(sparse) is actually dense. ___

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-04-30 Thread Daπid
On 1 May 2013 03:36, Benjamin Root wrote: There is one other non-trivial function that have been discussed before: np.minmax(). My thinking is that it would return a 2xN array (where N is whatever size of the result that would be returned if just np.min() was used). This

[Numpy-discussion] Pruned / sparse FFT 2D

2013-04-15 Thread Daπid
Hi, I have a sparse cloud of points of ~10^4 points randomly scattered around a triangular domain [1] from which I want to take the Fourier transform. I have been looking for algorithms and found one library, but only appears to be for the 1-D case (and seems there is no documentation). In [3]

Re: [Numpy-discussion] Sources more confusing in Python

2013-04-07 Thread Daπid
On 7 April 2013 16:53, Happyman wrote: I completed my Registration..but still no idea how to use is ,may be, lack of experience of python .. You don't need registration. The easiest way to use it is via pip or easy_install. If you are on Windows, download and

Re: [Numpy-discussion] timezones and datetime64

2013-04-04 Thread Daπid
On 4 April 2013 11:03, Daniele Nicolodi wrote: I think that generally the issue is not relevant for any practical use of a timebase: there are not many applications requiring sub-second accuracy over many years periods. I agree. I think the basic datetime object should

Re: [Numpy-discussion] Execution time difference between 2.7 and 3.2 using numpy

2013-03-23 Thread Daπid
I am a bit worried about the differences in results. Just to be sure you are comparing apples with apples, it may be a good idea to set the seed at the beginning: np.random.seed( SEED ) where SEED is an int. This way, you will be inverting always the same matrix, regardless of the Python

Re: [Numpy-discussion] Execution time difference between 2.7 and 3.2 using numpy

2013-03-20 Thread Daπid
Without much detailed knowledge of the topic, I would expect both versions to give very similar timing, as it is essentially a call to ATLAS function, not much is done in Python. Given this, maybe the difference is in ATLAS itself. How have you installed it? When you compile ATLAS, it will do

Re: [Numpy-discussion] R: fast numpy.fromfile skipping data chunks

2013-03-13 Thread Daπid
On 13 March 2013 16:54, Andrea Cimatoribus andrea.cimatori...@nioz.nlwrote: Since I'm in the process of buying new hardware too, a slight OT (but definitely related). Does an ssd provide substantial improvement in these cases? It should help. Nevertheless, when talking about performance, it

Re: [Numpy-discussion] numpy.test('full') errors and failures

2013-02-12 Thread Daπid
On 12 February 2013 10:55, Dominic Steinitz wrote: Running unit tests for numpy NumPy version I can see this is not the stable version, try the 1.7 that has been just released. ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] number of tests

2013-02-12 Thread Daπid
On 12 February 2013 04:54, Davide Del Vento wrote: Ran 3587 tests in 22.211s FAILED (KNOWNFAIL=5, SKIP=11, failures=2) Whereas in a remote batch node (with a script) I get: Ran 3229 tests in 15.642s OK (KNOWNFAIL=5, SKIP=19) On my machine (linux 64 bits) In [3]:

[Numpy-discussion] pip install numpy throwing a lot of output.

2013-02-12 Thread Daπid
I have just upgraded numpy with pip on Linux 64 bits with Python 2.7, and I got *a lot* of output, so much it doesn't fit in the terminal. Most of it are gcc commands, but there are many different errors thrown by the compiler. Is this expected? I am not too worried as the test suite passes, but

Re: [Numpy-discussion] pip install numpy throwing a lot of output.

2013-02-12 Thread Daπid
On 12 February 2013 14:58, Francesc Alted wrote: Yes, I think that's expected. Just to make sure, can you send some excerpts of the errors that you are getting? Actually the errors are at the beginning of the process, so they are out of the reach of my terminal right now.

Re: [Numpy-discussion] Issues to fix for 1.7.0rc2.

2013-02-06 Thread Daπid
On 6 February 2013 08:41, Charles R Harris wrote: More Python craziness In [6]: print None or 0 0 In [7]: print 0 or None None Just for clarifying this behaviour: In [1]: print None or 0 0 In [2]: print 0 or None None In [3]: val = 0 or None In [4]: print val

Re: [Numpy-discussion] Insights / lessons learned from NumPy design

2013-01-09 Thread Daπid
On Jan 9, 2013 11:35 AM, Mike Anderson wrote: But I'm curious: what is the main use case for the alternative data types in NumPy? Is it for columns of data of heterogeneous types? or something else? In my case, I have used 32 bit (or lower) arrays due to memory

Re: [Numpy-discussion] Efficient way of binning points and applying functions to these groups

2012-12-26 Thread Daπid
This looks like the perfect work for cython. It it's great opp optimizing loops. Another option is the new Numba, an automatic compiler. David. El 26/12/2012 10:09, Eric Emsellem escribió: Hi! I am looking for an efficient way of doing some simple binning of points and

Re: [Numpy-discussion] numpy where function on different sized arrays

2012-11-24 Thread Daπid
A pure Python approach could be: for i, x in enumerate(a): for j, y in enumerate(x): if y in b: idx.append((i,j)) Of course, it is slow if the arrays are large, but it is very readable, and probably very fast if cythonised. David. On Sat, Nov

  1   2   >