[Numpy-discussion] Failure to build numpy 1.6.1

2011-11-08 Thread Mads Ipsen
-- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark

[Numpy-discussion] Build warnings

2011-11-20 Thread Mads Ipsen
-- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip

[Numpy-discussion] dtype

2011-11-28 Thread Mads Ipsen
-- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip

[Numpy-discussion] Warning related to __multiarray_api.h

2011-12-09 Thread Mads Ipsen
Hi, I don't know if this is of importance, but when I compile code using the numpy C API, I get the warning: site-packages/numpy/core/include/numpy/__multiarray_api.h:1532: warning: 'int _import_array()' defined but not used Might be worth cleaning it up. Best regards, Mads

[Numpy-discussion] Index update

2012-01-10 Thread Mads Ipsen
-- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com

[Numpy-discussion] Unexpected reorganization of internal data

2012-01-31 Thread Mads Ipsen
. However, if I do: V = numpy.array(U.transpose()).transpose() and call the C++ routine, everything is perfectly fine, ie. the data structure is as expected. What went wrong? Best regards, Mads -- +-+ | Mads Ipsen

Re: [Numpy-discussion] Unexpected reorganization of internal data

2012-02-02 Thread Mads Ipsen
-- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com

[Numpy-discussion] _import_array()

2012-02-14 Thread Mads Ipsen
-- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com

Re: [Numpy-discussion] _import_array()

2012-02-14 Thread Mads Ipsen
. PyArray_DIMS and PyArray_DATA could become functions that are looked up in an API-table that must be loaded by import_array() ). Best regards, -Travis On Feb 14, 2012, at 3:03 AM, Mads Ipsen wrote: Hi, I have C++ module (OpenGL) that extracts data from numpy arrays. The interface is pure

Re: [Numpy-discussion] _import_array()

2012-02-14 Thread Mads Ipsen
On 14/02/2012 10:30, Pauli Virtanen wrote: 14.02.2012 10:20, Mads Ipsen kirjoitti: [clip] * Should import_array() only be called one time, namely when the main application is started? It should be called once when the application is started, before you do any other Numpy-using operations

[Numpy-discussion] Minus zero

2012-03-16 Thread Mads Ipsen
readable (and there's certainly space enough to add it)? Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv

[Numpy-discussion] Slices from an index list

2012-04-11 Thread Mads Ipsen
, is there some nifty numpy function that can generate the above slices for me (or their start and stop values)? Best regards, Mads -- +-+ | Mads Ipsen

Re: [Numpy-discussion] Slices from an index list

2012-04-11 Thread Mads Ipsen
On 11/04/2012 13:42, Warren Weckesser wrote: On Wed, Apr 11, 2012 at 4:28 AM, Mads Ipsen madsip...@gmail.com mailto:madsip...@gmail.com wrote: Hi, Suppose a have an array of indices, say indices = [0,1,2,3,5,7,8,9,10,12,13,14] Then the following slices a = slice

Re: [Numpy-discussion] Slices from an index list

2012-04-11 Thread Mads Ipsen
that.) ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion Thanks - very helpful! -- +-+ | Mads Ipsen

[Numpy-discussion] int and long issues

2013-01-10 Thread Mads Ipsen
-- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip

Re: [Numpy-discussion] int and long issues

2013-01-10 Thread Mads Ipsen
Sebastian - thanks - very helpful. Best regards, Mads On 10/01/2013 12:06, Sebastian Berg wrote: On Thu, 2013-01-10 at 11:32 +0100, Mads Ipsen wrote: Hi, I find this to be a little strange: x = numpy.arange(10) isinstance(x[0],int) gives True y = numpy.where(x 5)[0

[Numpy-discussion] argsort

2013-01-15 Thread Mads Ipsen
] [11 6]] [[ 8 9] [23 7]] [[11 6] [ 8 9]] [[23 7] [ 1 12]]] I thought this should produce a sorted version of the indices array. Any help is appreciated. Best regards, Mads -- +-+ | Mads Ipsen

Re: [Numpy-discussion] argsort

2013-01-16 Thread Mads Ipsen
towards the correct solution. Best regards, Mads On 01/15/2013 09:53 PM, eat wrote: Hi, On Tue, Jan 15, 2013 at 1:50 PM, Mads Ipsen madsip...@gmail.com mailto:madsip...@gmail.com wrote: Hi, I simply can't understand this. I'm trying to use argsort to produce indices that can

[Numpy-discussion] Porting to the new C-API (1.7)

2013-10-21 Thread Mads Ipsen
this whole thing is explained in detail. I must admit, its somewhat hard to grasp what's going on. Best regards, Mads -- +-+ | Mads Ipsen

[Numpy-discussion] Fast decrementation of indices

2014-02-02 Thread Mads Ipsen
, 2, 2, 2, 3, 5, 6], [2, 3, 5, 2, 1, 6, 0, 0, 1, 2]] The Python for loop in (*) may easily contain 50.000 iteration. Is there a smart way to utilize numpy functionality to avoid this? Thanks and best regards, Mads -- +-+ | Mads Ipsen

Re: [Numpy-discussion] Fast decrementation of indices

2014-02-03 Thread Mads Ipsen
= np.where(keepdata[b[0]] keepdata[b[1]]) newindex = keepdata.cumsum()-1 c = newindex[b[:,w[0]]] -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7

[Numpy-discussion] Accessing irregular sized array data from C

2014-07-02 Thread Mads Ipsen
= numpy.array([a1,a2,a3]) How can open up the doors to the array data of b on the C-side? Best regards, Mads -- +-+ | Mads Ipsen

Re: [Numpy-discussion] Accessing irregular sized array data from C

2014-07-02 Thread Mads Ipsen
On 02/07/14 12:46, Julian Taylor wrote: On Wed, Jul 2, 2014 at 12:15 PM, Mads Ipsen mads.ip...@gmail.com wrote: Hi, If you setup an M x N array like this a = 1.0*numpy.arange(24).reshape(8,3) you can access the data from a C function like this void foo(PyObject * numpy_data

[Numpy-discussion] error: comma at end of enumerator list

2009-09-10 Thread Mads Ipsen
4.3.2-1ubuntu12) Ubuntu 8.10 Best regards, Mads -- ++ | Mads Ipsen, Scientific developer | +--+-+ | QuantumWise A/S | phone: +45

[Numpy-discussion] Error in header file - wrong mailing list?

2009-09-12 Thread Mads Ipsen
Hey, I recently posted a bug related to a compile error in the header file 'npy_common.h' but have received no responses so far. Am I posting this in the wrong mailing list? Best regards, Mads -- ++ | Mads Ipsen, Scientific

Re: [Numpy-discussion] Error in header file - wrong mailing list?

2009-09-14 Thread Mads Ipsen
a single comma, which will make the source less sensitive to compilers and compiler flags. Mads -- ++ | Mads Ipsen, Scientific developer | +--+-+ | QuantumWise

[Numpy-discussion] Tuple outer product?

2009-09-25 Thread Mads Ipsen
Is there a numpy operation on two arrays, say [1,2,3] and [4,5,6], that will yield: [[(1,4),(1,5),(1,6)],[(2,4),(2,5),(2,6)],[(3,4),(3,5),(3,6)]] Any suggestions are most welcome. Mads -- ++ | Mads Ipsen, Scientific developer

Re: [Numpy-discussion] Tuple outer product?

2009-09-25 Thread Mads Ipsen
Gökhan Sever wrote: On Fri, Sep 25, 2009 at 12:45 PM, Mads Ipsen m...@comxnet.dk mailto:m...@comxnet.dk wrote: Is there a numpy operation on two arrays, say [1,2,3] and [4,5,6], that will yield: [[(1,4),(1,5),(1,6)],[(2,4),(2,5),(2,6)],[(3,4),(3,5),(3,6)]] Any

Re: [Numpy-discussion] Tuple outer product?

2009-09-25 Thread Mads Ipsen
).reshape(n,m) b = numpy.repeat(b,n).reshape(m,n).transpose() ab = numpy.dstack((a,b)) print ab.tolist() [[[1, 4], [1, 5], [1, 6]], [[2, 4], [2, 5], [2, 6]], [[3, 4], [3, 5], [3, 6]]] -- ++ | Mads Ipsen, Scientific developer

Re: [Numpy-discussion] Tuple outer product?

2009-09-25 Thread Mads Ipsen
Alan G Isaac wrote: On 9/25/2009 4:01 PM, Mads Ipsen wrote: a = numpy.array([1,2,3]) b = numpy.array([4,5,6]) (n,m) = (a.shape[0],b.shape[0]) a = numpy.repeat(a,m).reshape(n,m) b = numpy.repeat(b,n).reshape(m,n).transpose() ab = numpy.dstack((a,b)) print ab.tolist() That's

Re: [Numpy-discussion] Tuple outer product?

2009-09-26 Thread Mads Ipsen
Robert Kern wrote: On Fri, Sep 25, 2009 at 17:38, Mads Ipsen m...@comxnet.dk wrote: Yes, but it should also work for [2.1,3.2,4.5] combined with [4.6,-2.3,5.6] - forgot to tell that. In [5]: np.transpose(np.meshgrid([2.1,3.2,4.5], [4.6,-2.3,5.6])) Out[5]: array([[[ 2.1, 4.6

[Numpy-discussion] Tracking and inspecting numpy objects

2014-09-15 Thread Mads Ipsen
in advance. Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | phone: +45-29716388 | | DK-2500 Valby

Re: [Numpy-discussion] Tracking and inspecting numpy objects

2014-09-15 Thread Mads Ipsen
+0200, Mads Ipsen wrote: Hi, I am trying to inspect the reference count of numpy arrays generated by my application. Initially, I thought I could inspect the tracked objects using gc.get_objects

[Numpy-discussion] Detect if array has been transposed

2014-10-12 Thread Mads Ipsen
been invoked on the matrix, and thereby only do the copy operation when it really is needed? For example if a_has_transposed_data: foo(a.copy()) else: foo(a) Best regards, Mads -- +-+ | Mads Ipsen

Re: [Numpy-discussion] Detect if array has been transposed

2014-10-13 Thread Mads Ipsen
On 13/10/14 01:18, Nathaniel Smith wrote: On Mon, Oct 13, 2014 at 12:07 AM, Pauli Virtanen p...@iki.fi wrote: 12.10.2014, 22:16, Eric Firing kirjoitti: On 2014/10/12, 8:29 AM, Pauli Virtanen wrote: 12.10.2014, 20:19, Mads Ipsen kirjoitti: Is there any way for me to detect (on the Python side

[Numpy-discussion] dot and MKL memory

2015-02-27 Thread Mads Ipsen
the script, the evaluation of the 'dot' increases the memory by app. 450 MB. Is the expected? Best regards, Mads specs: Ubuntu 12.04 ifort (IFORT) 14.0.1 2013100 gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) -- +-+ | Mads Ipsen