Re: [Numpy-discussion] recarray

2006-09-18 Thread Francesc Altet
El dl 18 de 09 del 2006 a les 09:38 +0200, en/na Lionel Roubeyrie va escriure: > Le vendredi 15 septembre 2006 16:05, Francesc Altet a écrit : > > Another possibility is to play with columns directly from the initial > > recarray. The next is an example: > > > > In [101]

Re: [Numpy-discussion] recarray

2006-09-18 Thread Francesc Altet
El dl 18 de 09 del 2006 a les 17:10 +0200, en/na Lionel Roubeyrie va escriure: > Le lundi 18 septembre 2006 12:17, Francesc Altet a écrit : > > You have two problems here. The first is that you shouldn't have missign > > entries, or conversion from empty strings to int

Re: [Numpy-discussion] max argmax combo

2006-09-19 Thread Francesc Altet
ong in my count, but there appear to be only three of such functions in NumPy, namely, argmax, argmin and argsort. Adding three additional 'combos' doesn't seem a lot to my mind, but it can be just 'too much' for more common sense minds. Cheers, -- >0,0< F

Re: [Numpy-discussion] max argmax combo

2006-09-19 Thread Francesc Altet
A Dimarts 19 Setembre 2006 19:21, Charles R Harris va escriure: > On 9/19/06, Francesc Altet <[EMAIL PROTECTED]> wrote: > > A Dimarts 19 Setembre 2006 07:18, Charles R Harris va escriure: > > > I note that argsort also produces indexes that are hard to use in the > >

[Numpy-discussion] Possible inconsisteny in enumerated type mapping

2006-09-20 Thread Francesc Altet
d NumPy enumerated types, like: numpy.int32 --> NPY_INT numpy.int64 --> NPY_LONGLONG numpy.int_ --> NPY_LONG in all platforms, avoiding the current situation of ambiguous mapping between platforms. Sorry for being so persistent, but I think the issue is worth it. -- >0,0< Fran

Re: [Numpy-discussion] max argmax combo

2006-09-20 Thread Francesc Altet
lace sort() immediately after an argsort() operation is very efficient (cache effects here?), and would avoid the need of the combo function (from the point of view of efficiency, I repeat). Cheers, -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data &qu

Re: [Numpy-discussion] Possible inconsisteny in enumerated type mapping

2006-09-20 Thread Francesc Altet
Blame on me. Sorry about any inconveniences and thanks once more for your patience! -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" - Take Surveys. Earn Cash.

[Numpy-discussion] Negative division and numpy scalars

2006-09-25 Thread Francesc Altet
esult. In fact, I like this behaviour of NumPy scalars (at least, when I'm aware of it!), but I thought it would be nice to warn other people about that. Cheers, -- >0,0< Francesc Altet http://ww

[Numpy-discussion] NumPy types --> Numeric typecodes map?

2006-09-25 Thread Francesc Altet
27;d', 'Object': 'O', 'UInt8': 'b', 'UInt32': 'u', 'Complex64': 'D', 'UInt16': 'w', 'Bool': 'B', 'Complex32': 'F', 'Int64': 'N', 'Int8&

Re: [Numpy-discussion] NumPy types --> Numeric typecodes map?

2006-09-25 Thread Francesc Altet
El dl 25 de 09 del 2006 a les 11:08 -0600, en/na Travis Oliphant va escriure: > Francesc Altet wrote: > > >Hi, > > > >Anybody know if there is a map between NumPy types and Numeric > >typecodes? Something like 'typecodes' for numarray: > > >

[Numpy-discussion] typeDict vs sctypeDict

2006-09-26 Thread Francesc Altet
a future. Cheers, -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay pan

[Numpy-discussion] Default values in scalar constructors

2006-09-26 Thread Francesc Altet
y/ in () : function takes exactly 1 argument (0 given) -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" - Take Surveys. Earn Cash. Influence the Future of IT Join Sour

[Numpy-discussion] More about data types in NumPy

2006-09-27 Thread Francesc Altet
umpy.dtype('int32').type True So far so good, but is the next the intended behaviour? >>> numpy.typeDict['i4'] >>> numpy.typeDict['int32'] >>> numpy.typeDict['i4'

Re: [Numpy-discussion] More about data types in NumPy

2006-09-27 Thread Francesc Altet
El dc 27 de 09 del 2006 a les 10:01 +0100, en/na James Graham va escriure: > Francesc Altet wrote: > > So far so good, but is the next the intended behaviour? > > > >>>> numpy.typeDict['i4'] > > > >>>> numpy.typeDict['int32'

Re: [Numpy-discussion] More about data types in NumPy

2006-09-27 Thread Francesc Altet
El dc 27 de 09 del 2006 a les 11:01 -0600, en/na Travis Oliphant va escriure: > Francesc Altet wrote: > > Hello, > > > > Sorry for being insistent, but I recognize that I'm having a bad time > > with NumPy data type rational. Is there an explanation for this?: &g

Re: [Numpy-discussion] Release candidate 2.0 will come out mid-week next week

2006-09-28 Thread Francesc Altet
ossible. Eventually, when you have to start changes that properly belongs to trunk, then it's time to create the branch, but meanwhile you can save yourself quite a few syncronization work. Anyway, it is my pleasure to help finding bugs for NumPy! -- >0,0< Francesc Altet http://

[Numpy-discussion] Negative values with unsigned data types problems

2006-09-29 Thread Francesc Altet
o base class ndarray. 130 """ --> 131 return array(a, dtype, copy=False, order=order) 132 133 def asanyarray(a, dtype=None, order=None): : long() argument must be a string or a number, not 'list' and the same happens with 'uint64'. My numpy vers

[Numpy-discussion] Incorrect removal of NULL char in buffers

2006-09-29 Thread Francesc Altet
n't: In [101]: numpy.ndarray(buffer="a\x00b"*4, dtype="S4", shape=3) Out[101]: array([aba, ba, bab], dtype='|S4') i.e. it seems like numpy is striping-off NULL chars before building the object and I don&#x

[Numpy-discussion] Non-writeable default for numpy.ndarray

2006-09-29 Thread Francesc Altet
) i.e. in an array built from ndarray, the default is that it has to be read-only? -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" - Take Surveys. Earn C

Re: [Numpy-discussion] Non-writeable default for numpy.ndarray

2006-09-29 Thread Francesc Altet
; a > > '12345123\x00\x00\xc6B34512345' > > The original, *immutable* string has been mutated. This could get you > into real trouble in certain situations. I see. Thanks for the explanation. -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop

Re: [Numpy-discussion] Non-writeable default for numpy.ndarray

2006-10-01 Thread Francesc Altet
El dv 29 de 09 del 2006 a les 16:27 -0600, en/na Travis Oliphant va escriure: > Francesc Altet wrote: > > >I see. Thanks for the explanation. > > > > > You deserve the thanks for the great testing of less-traveled corners of > NumPy. It's exactly the kind

[Numpy-discussion] Fastest way of distinguish a numpy scalar of a python scalar?

2006-10-03 Thread Francesc Altet
ther an object is a numpy scalar or a python one? Thanks, -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" - Take Surveys. Earn Cash. Influence the Future of IT J

Re: [Numpy-discussion] Memory errors

2006-10-06 Thread Francesc Altet
ray([1, 1, 2, 3, 4, 5, 6, 7, 8, 1]) [be sure to use parentesizes appropriately] Cheers, -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" - Take Surveys.

[Numpy-discussion] PyTables passes all tests with NumPy at its core

2006-10-06 Thread Francesc Altet
great news :-) Cheers! -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay pan

Re: [Numpy-discussion] select part of array using two conditions

2006-10-11 Thread Francesc Altet
to use the boolean binary operators (and not the logical operators) for doing this: >>> a[(a>2) & (a<8)] Notice the parenthesis. They are necessary because the operator & has more precedence than < or >. -- >0,0< Francesc Altet http://www.carabos.com/ V V

[Numpy-discussion] Testing numpy without doing an installation?

2006-10-13 Thread Francesc Altet
ave a way of testing a recently built version of numpy prior to install it. Thanks, -- >0,0< Francesc Altet http://www.carabos.com/ V V Cárabos Coop. V. Enjoy Data "-" "Be careful about using the followi

Re: [Numpy-discussion] Testing numpy without doing an installation?

2006-10-17 Thread Francesc Altet
A Divendres 13 Octubre 2006 22:20, Lisandro Dalcin va escriure: > On 10/13/06, Francesc Altet <[EMAIL PROTECTED]> wrote: > > Is it possible to test a numpy version directly from the source > > directory without having to install it? > > I usually do: > > $ python s

[Numpy-discussion] Accessing data buffers in numpy scalars

2006-10-17 Thread Francesc Altet
to access the pointer to data in memory. However, I lack experience in buffer protocol, so suggestions for achieving this are welcome. If there is some other trivial way that I haven't devised (specially if usable from pyrex), please tell me about. TIA, -- >0,0< Francesc Alt

Re: [Numpy-discussion] Accessing data buffers in numpy scalars

2006-10-17 Thread Francesc Altet
d **)&buffer, &buflen) Oh, this one seems pretty easy, and as a plus, you don't have to book memory for copying the data area, so I'll use it. Thanks, -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" --

[Numpy-discussion] Question about boolean types comparisons

2006-10-18 Thread Francesc Altet
ut[31]:True Perhaps raising an error saying something like "boolean types cannot be compared" would be nice. Not too important, but worth to notice, IMO. -- >0,0< Francesc Altet| Be careful about using the following code -- V V Carabos Coop. V. | I've only proven th

Re: [Numpy-discussion] Numpy-scalars vs Numpy 0-d arrays: copy or not copy?

2006-10-20 Thread Francesc Altet
can be more) is using ndarray: In [47]: a=numpy.array([1,2,3], dtype="i4") In [48]: n=1# the position that you want to share In [49]: b=numpy.ndarray(buffer=a[n:n+1], shape=(), dtype="i4") In [50]: a Out[50]: array([1, 2, 3]) In [51

Re: [Numpy-discussion] 1.0

2006-10-26 Thread Francesc Altet
elopment skills, since due to my ignorance in that area > I cannot even appreciate it fully.) > > Thanks, and relax a little after all the hard work! Yeah, I completely agree. Congratulations to Travis and all the NumPy team. Long life to NumPy! -- Francesc Altet| Be careful abou

Re: [Numpy-discussion] astype() behaviour

2006-10-27 Thread Francesc Altet
erted to float64. Yes, I think the behaviour is intended. This is because 'float64' is the default type in NumPy from some months ago (before the default was 'int_') HTH, -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-&qu

Re: [Numpy-discussion] dtype() examples that used to work

2006-10-27 Thread Francesc Altet
but now they all generate a "TypeError: data type not understood". Why? Should be intended as well. If you try to set a dtype from a list, it has to follow the format of a description as specified in: http://numpy.scipy.org/array_interface.shtml for example: In [67]: dtype([('f1&#x

Re: [Numpy-discussion] dtype() examples that used to work

2006-10-30 Thread Francesc Altet
ve taken the freedom to add some examples of nested types and recarrays. -- Francesc Altet| Be careful about using the following code -- Carabos Coop. V. | I've only proven that it works, www.carabos.com |

Re: [Numpy-discussion] Reading records from file and sorting

2006-11-01 Thread Francesc Altet
El dt 31 de 10 del 2006 a les 23:38 +, en/na George Sakkis va escriure: > Is there a more elegant and/or faster way to read some records from a > file and then sort them by different fields ? What I have now is too > specific and error-prone in general: > > import numpy as N > records = N.from

Re: [Numpy-discussion] Reading records from file and sorting

2006-11-01 Thread Francesc Altet
e > (records.sort('f1') doesn't work unfortunately), that would be perfect. Yes, I agree that having the possibility to do records.sort('f1') would be a great addition (both in terms of usability but also efficiency). Cheers, -- Francesc Altet| Be careful about using the

[Numpy-discussion] numarray indexing problems with Python2.5 and 64-bit platforms

2006-11-02 Thread Francesc Altet
n the end, it is a very good piece of software) in PyTables, but don't having a solution for this problem anytime soon, will make this very problematic to us. Thanks, -- Francesc Altet| Be careful about using the following code -- Carabos Coop. V. | I've only proven

Re: [Numpy-discussion] numarray indexing problems with Pyth on2.5 and 64-bit platforms

2006-11-03 Thread Francesc Altet
tp_repr (typeobject.c:4504) it seems to my inexpert eyes that the compiler has generated some code that it is not understood by the amd64 architecture (?). [1] <http://sourceforge.net/tracker/index.php?func=detail&aid=1565683&group_id=1369&atid=45

[Numpy-discussion] Numeric 24.2 indexing problems with Python 2.5 and 64-bit platforms

2006-11-03 Thread Francesc Altet
on 2.5 and 64-bit platforms (or, at very least, Linux64 on top of AMD64 :P) can lend to pretty scaring results. Cheers, -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" --

Re: [Numpy-discussion] numarray indexing problems with Python2.5 and 64-bit platforms

2006-11-03 Thread Francesc Altet
A Dijous 02 Novembre 2006 22:26, A. M. Archibald escrigué: > On 02/11/06, Francesc Altet <[EMAIL PROTECTED]> wrote: > > I see this as a major issue in numarray and poses in great danger the > > intended support of PyTables for numarray that we planned for some time > &

Re: [Numpy-discussion] reading matrix from a file

2006-11-08 Thread Francesc Altet
: b.extend([float(n) for n in line.split()]) : In [66]: A=numpy.array(a).reshape(2,2); B=numpy.array(b).reshape(2,2) In [67]: A, B Out[67]: (array([[ 1., 2.], [ 3., 9.]]), array([[ 2., 3.], [ 4., 4.]])) HTH, -- >0,0< Francesc Altet     htt

Re: [Numpy-discussion] reading matrix from a file

2006-11-08 Thread Francesc Altet
, >[3, 9]]) > > In [12]: b > Out[12]: > array([[2, 3], > [4, 4]]) Yeah. Much, much better indeed. -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" -

Re: [Numpy-discussion] Calculating tan inverse

2006-11-08 Thread Francesc Altet
.org in particular, try: arctan site:www.scipy.org Cheers, -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" - Using Tomcat but need to do more? Need to suppor

Re: [Numpy-discussion] array from list of lists

2006-11-13 Thread Francesc Altet
27;formats':('S1','f4', 'f4')}").repeat(3,10) Out[51]:[0.44204592704772949, 0.43584394454956055, 0.50145101547241211] In [52]:Timer("numpy.array([tuple(row) for row in results], dtype=my

Re: [Numpy-discussion] mysql -> record array

2006-11-16 Thread Francesc Altet
quot;setup SQLite took", t1-t0, "seconds" t0 = time.time() y1 = retrieveSQLite(conn) t1 = time.time() print "retrieve SQLite took", t1-t0, "seconds" conn.close() fileh = pt.openFile("test.h5", "w"

Re: [Numpy-discussion] Any Numeric or numarray users on this list?

2006-05-31 Thread Francesc Altet
in NumPy would be nice. Also working in introducing a simple array class in Python core and using the array protocol to access the data would be very good. Cheers, -- >0,0< Francesc Altet     http://www.carabos.com/ V V

Re: [Numpy-discussion] numpy vs numeric benchmarks

2006-06-02 Thread Francesc Altet
will finally encourage people to always use dot. So, why not issuing a DeprecationWarning on a matrixmultiply function use? -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Re: [Numpy-discussion] Array Protocol change for Python 2.6

2006-06-09 Thread Francesc Altet
should be the difference of representation of longs in 32-bit and 64-bit platforms, isn't it? Cheers, -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" ___ Numpy-di

Re: [Numpy-discussion] Back to numexpr

2006-06-13 Thread Francesc Altet
t in our local copy of numexpr, so perhaps (I say perhaps because we are in the middle of a big project now and are a bit scarce of time resources) we can provide the patch against the latest version of David for your consideration. With this we can solve the problem with int64 support in 32-bit

Re: [Numpy-discussion] Back to numexpr

2006-06-13 Thread Francesc Altet
A Dimarts 13 Juny 2006 19:47, Francesc Altet va escriure: > > - Support for both numpy and numarray (use the flag --force-numarray > > in setup.py). > > > > At first glance this looks like it doesn't make things to messy, so I'm > > in favor of incor

Re: [Numpy-discussion] Back to numexpr

2006-06-13 Thread Francesc Altet
you can't even cast it to any other commonly available datatype (casting to a float64 will also loose precision). And, although you can afford loosing precision when dealing with floating data in some scenarios (but not certainly with a general-purpose library like numexpr tries to be

Re: [Numpy-discussion] Array Protocol change for Python 2.6

2006-06-16 Thread Francesc Altet
addresses as ints/longs. Very interesting. So, may I suggest to use this capability to represent addresses? I think this would simplify things (specially it will prevent to use ascii/pointer conversions, which are ugly to my mind). Cheers, -- >0,0< Francesc Alt

Re: [Numpy-discussion] Recarray attributes writeable

2006-06-17 Thread Francesc Altet
sted1']['nested2']['nested3']. In the same way, elements of 'nested2' field could be accessed by: tr.fields['nested1']['nested2'][2:10:2]. 5. Finally, you can even prevent setting or deleting columns by disabling the __setattr__ and __delattr__

Re: [Numpy-discussion] Help for Windows Python, numpy and f2py

2006-06-20 Thread Francesc Altet
g would be much appreciated! Here is the > message I get trying to run f2py: > Mmm, perhaps you can try with putting: [build] compiler=mingw32 in your local distutils.cfg (see http://docs.python.org/inst/config-syntax.html) HTH, -- >0,0< Francesc Altet     http://w

[Numpy-discussion] ANN: PyTables (a hierarchical database) 1.3.2 released

2006-06-21 Thread Francesc Altet
=== Announcing PyTables 1.3.2 === This is a new minor release of PyTables. There you will find, among other things, improved support for NumPy strings and the ability to create indexes of NumPy-flavored tables (this capability was broken in earlier

Re: [Numpy-discussion] RandomArray module

2006-07-13 Thread Francesc Altet
ecise this point. > > Please, give some comments. Thanks. Done ;-) -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" - Using Tomcat but need to do mor

Re: [Numpy-discussion] Version numbers again

2006-07-27 Thread Francesc Altet
than the second (i.e. using a past release version in SVN) because I tend to find it slightly less confusing. However, I think that if you choose whatever convention consistently, people will get used to it and everything will be fine. -- >0,0<

[Numpy-discussion] Memory leak in array protocol numarray<--numpy

2006-08-11 Thread Francesc Altet
ink this is a relatively important problem, because it somewhat prevents a smooth transition from numarray to NumPy. Thanks, -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" -

Re: [Numpy-discussion] numpy.ascontiguousarray on byteswapped data !?

2006-08-11 Thread Francesc Altet
t; No, I'm not even sure why exactly that was written but it's just in the > testing code. I think this is my fault. Some months ago I contributed some testing code for checking numerical types, and ended with thi

Re: [Numpy-discussion] Memory leak in array protocol numarray <--numpy

2006-08-12 Thread Francesc Altet
obj) > Py_XDECREF(a->base) > a->base = obj > Py_DECREF(cobj) > > Thanks Travis! Hey! I checked this morning Travis' patch and seems to work well for me. I'll add yours as well later on and see... BTW, where exactly I've to add the above lines? Many thank

[Numpy-discussion] First impressions on migrating to NumPy

2006-08-18 Thread Francesc Altet
also wanted to thanks (once more), the excellent work of the NumPy crew, and specially Travis for their first-class work. Thanks! -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-"

Re: [Numpy-discussion] bugfix-patch for numpy-1.0b2 setup

2006-08-18 Thread Francesc Altet
packages of public releases, that's all. Cheers, -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" - Using Tomcat but need to do more? Need to support web

Re: [Numpy-discussion] First impressions on migrating to NumPy

2006-08-18 Thread Francesc Altet
pened to check everything, look at online docstrings and be able to do fast timings added the "cerise sur le gâteau". Luck! -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" --

[Numpy-discussion] [ANN] PyTables 1.3.3 released

2006-08-25 Thread Francesc Altet
=== Announcing PyTables 1.3.3 === I'm happy to announce a new minor release of PyTables. In this one, we have focused on improving compatibility with latest beta versions of NumPy (0.9.8, 1.0b2, 1.0b3 and higher), adding some improvements and the ty

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-26 Thread Francesc Altet
more). I'm personally an addict to encapsulate as much functionality as possible in methods (but perhaps I'm biased by an insane use of TAB in ipython console). Cheers, -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-"

[Numpy-discussion] [RFE] Suport for version 3 of array protocol in numarray

2006-08-26 Thread Francesc Altet
transition. Thanks, -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-" - Using Tomcat but need to do more? Need to support web services, security? Get stuff done

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-26 Thread Francesc Altet
A Dissabte 26 Agost 2006 13:42, Bill Baxter va escriure: > On 8/26/06, Francesc Altet <[EMAIL PROTECTED]> wrote: > > I'm personally an addict to encapsulate as much functionality as possible > > in > > methods (but perhaps I'm biased by an insane use of TAB

Re: [Numpy-discussion] Optimizing mean(axis=0) on a 3D array

2006-08-26 Thread Francesc Altet
Intel). On its hand, fancy indexing seems to use an iterator and copying the elements one-by-one seems faster. I'd say that replacing memmove by memcpy would make .take() much faster. Regards, -- >0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy D

Re: [Numpy-discussion] numpy test failure: "ctypes is not available"

2006-09-08 Thread Francesc Altet
aise ImportError, "ctypes is not available." > ImportError: ctypes is not available. This may be due to the fact that you are using Python 2.4 here and ctypes comes with Python2.5. Switch to 2.5, install ctypes separately or feel free to ignore this. I suppose that a check has t

Re: [Numpy-discussion] In-place operations

2006-09-12 Thread Francesc Altet
y other reference to it) and the new object will be bound to B. If what you want is to avoid having in memory the three objects (namely A, old B and new B) at the same time, you can do something like: del B # deletes reference t

Re: [Numpy-discussion] In-place operations

2006-09-12 Thread Francesc Altet
El dt 12 de 09 del 2006 a les 13:17 -0400, en/na Pierre Thibault va escriure: > Hello again, > > On 9/12/06, Francesc Altet <[EMAIL PROTECTED]> wrote: > > Hello Pierre, > > [...] > > > > Well, in some way, there is a temporary array creation that is > &g

Re: [Numpy-discussion] In-place operations

2006-09-13 Thread Francesc Altet
tead of one) perhaps the former is causing the OS to start swapping. However a quick look with top at the processes, says that both [1] and [2] takes similar amounts of memory (~ 170 MB peak) and, as arrays take 64 MB each, in both cases the used memory seems higher than the required at first sight. Mm

Re: [Numpy-discussion] NumPy 1.0 release-candidate 1.0 this weekend

2006-09-14 Thread Francesc Altet
epresentation for types ('Int32', 'Complex64'...) and looking at how NumPy represents it now, I'd say that this is a backwards step in readability. Something like '0,0< Francesc Altet http://www.carabos.com/ V V Cárabos Coop. V. Enjoy Data "-"

Re: [Numpy-discussion] how to get info about internals of an array object ?

2006-09-14 Thread Francesc Altet
py.array([1]) In [3]:a.data Out[3]: although I'm not sure which number is the memory address I'd say it's the last one. Cheers, -- >0,0< Francesc Altet http://www.carabos.com/ V V Cárabos Coop. V. Enjoy Data "-" -

Re: [Numpy-discussion] recarray

2006-09-15 Thread Francesc Altet
y("1"*36, dtype="a4,i4,f4", shape=3) In [102]: ra Out[102]: recarray([('', 825307441, 2.5784852031307537e-09), ('', 825307441, 2.5784852031307537e-09), ('', 825307441, 2.5784852031307537e-09)], dtype=[(&#

Re: [Numpy-discussion] PyArray_DescrConverter - alignment / trailing unused bytes

2006-09-15 Thread Francesc Altet
oblems. > Is there a way to force alignment or to get trailing unused bytes in the > dtpye? One possible solution is to declare void ('V' charcode) types for filling the gaps. For example: In [118]: ra=numpy.rec.array("1"*300, dtype=[('sval','0,0