Re: [Numpy-discussion] Silent Broadcasting considered harmful

2015-02-08 Thread Simon Wood
On Sun, Feb 8, 2015 at 5:28 PM, wrote: > On Sun, Feb 8, 2015 at 4:56 PM, Matthew Brett > wrote: > > Hi, > > > > On Sun, Feb 8, 2015 at 1:39 PM, Simon Wood wrote: > >> > >> > >> On Sun, Feb 8, 2015 at 4:24 PM, Stefan Reiterer wrote:

Re: [Numpy-discussion] Silent Broadcasting considered harmful

2015-02-08 Thread Simon Wood
On Sun, Feb 8, 2015 at 4:24 PM, Stefan Reiterer wrote: > I don't think this is a good comparison, especially since broadcasting is > a feature not a necessity ... > It's more like turning off/on driving assistance. > > And as already mentioned: other matrix languages also allow it, but they > war

[Numpy-discussion] numpy.arrange not returning expected results (bug?)

2012-10-17 Thread Simon Lieschke
with some other similar calls. I'm using NumPy 1.6.2. Thanks in advance, Simon 14:21:46.77 @ C:\Users\simon >python Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license"

Re: [Numpy-discussion] fast numpy i/o

2011-06-21 Thread Simon Lyngby Kokkendorff
Hi, I have been using h5py a lot (both on windows and Mac OSX) and can only recommend it- haven't tried the other options though Cheers, Simon On Tue, Jun 21, 2011 at 8:24 PM, Derek Homeier < de...@astro.physik.uni-goettingen.de> wrote: > On 21.06.2011, at 7:58PM, Nea

Re: [Numpy-discussion] What Requires C and what is just python

2011-03-21 Thread Simon Lyngby Kokkendorff
that only standard libraries and numpy will be below 5 mb. Cheers, Simon On Mon, Mar 21, 2011 at 9:30 AM, Paul Anton Letnes < paul.anton.let...@gmail.com> wrote: > > On 20. mars 2011, at 16.08, Ben Smith wrote: > > > > > So, in addition to my computer science work, I&

Re: [Numpy-discussion] How to limit the numpy.memmap's RAM usage?

2010-10-25 Thread Simon Lyngby Kokkendorff
consider, actually from an advice via this list, the module h5py, which has a nice numpy interface to the hdf5 file format. It seemed more clear to me with the h5py-module, what was being buffered on disk and what was stored in RAM. Cheers, Simon On Sun, Oct 24, 2010 at 2:15 AM, David Cournapeau

Re: [Numpy-discussion] Accessing data in a large file

2010-06-17 Thread Simon Lyngby Kokkendorff
Thanks for the references to these libraries - they seem to fix my problem! Cheers, Simon On Thu, Jun 17, 2010 at 2:58 PM, davide wrote: > You may have a look to the nice python-h5py module, which gives an OO > interface to the underlying hdf5 file format. I'm using it for stor

[Numpy-discussion] Accessing data in a large file

2010-06-17 Thread Simon Lyngby Kokkendorff
lices and might have a problem with platform dependency (byte order). Hope that someone can help, cheers, Simon ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Profiling with cProfile

2009-02-09 Thread Simon Palmer
Hi, I am trying to profile a bit of code I have written using cProfile. When I run it I get the message: TypeError: unhashable type: 'numpy.ndarray' I am using runctx with some local variables which are ndarrays. I am guessing that this is a lmitation of either cProfile or numpy or the mix of

[Numpy-discussion] Multiplying a matrix by a vector

2009-02-04 Thread Simon Palmer
Bit of a newb question I suspect... I have a matrix and a vector which has the same number of elements as the matrix has rows. I want to multiply each element in a row in the matrix by the corresponding element in the vector. I can obviously do this with a loop, but am guessing there is a more

Re: [Numpy-discussion] numpy array serialization with JSON

2008-11-11 Thread Simon Palmer
her here or probably better to simplejson. On Mon, Nov 10, 2008 at 5:58 PM, Christopher Barker <[EMAIL PROTECTED]>wrote: > Simon Palmer wrote: > > What, if any, header information from numarray gets put in the bytes by > > tostring(), especially as I have n dimensions? > >

Re: [Numpy-discussion] numpy array serialization with JSON

2008-11-10 Thread Simon Palmer
. On Mon, Nov 10, 2008 at 5:36 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > On Mon, Nov 10, 2008 at 11:25, Simon Palmer <[EMAIL PROTECTED]> > wrote: > > Does anyone have a recommendation of a library/method for serialization > of > > numpy arrays to and from text

[Numpy-discussion] numpy array serialization with JSON

2008-11-10 Thread Simon Palmer
Does anyone have a recommendation of a library/method for serialization of numpy arrays to and from text (specifically for the purposes of embedding in XML)? I don't want to use pickle or tostring() because my XML has to be consumable across a variety of programming environments. I'm currently us

Re: [Numpy-discussion] product of arrays of different lengths

2008-09-15 Thread Simon Palmer
Thanks very much everyone, this has been very helpful. I have been doing some timing of my own and the order of magnitude difference that numpy provides wins. I'm learning python as I go so some of my questions come from a lack of language skillls, but it is good to get to know the numpy dialect

Re: [Numpy-discussion] Polyfit

2008-06-16 Thread Simon Palmer
At the risk of uttering a heresy, are you bound to Python for this? I bet you could find a C library that will work well, plus it is not a hard algorithm to code yourself. I am pretty sure I have used a numerical recipes algorithm for regression in my distant past. Also I can't help thinking the

Re: [Numpy-discussion] Large symmetrical matrix

2008-06-11 Thread Simon Palmer
using all the data. As scientists this is obvious, as a lay person, and particularly a business person, it appears to be madness. The fewer leaps of faith necessary the better. On Wed, Jun 11, 2008 at 7:34 PM, Anne Archibald <[EMAIL PROTECTED]> wrote: > 2008/6/10 Simon Palmer <

Re: [Numpy-discussion] Large symmetrical matrix

2008-06-11 Thread Simon Palmer
clustering yes, hierarchical no. On Wed, Jun 11, 2008 at 4:55 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > On Wed, Jun 11, 2008 at 9:33 AM, Simon Palmer <[EMAIL PROTECTED]> > wrote: > >> Pretty simple. I don't do any transformations. It is a

Re: [Numpy-discussion] Large symmetrical matrix

2008-06-11 Thread Simon Palmer
ms of performance and scalability. A fast and efficient solution to this issue would make a huge difference to me. On Wed, Jun 11, 2008 at 1:05 AM, Robert Kern <[EMAIL PROTECTED]> wrote: > On Tue, Jun 10, 2008 at 18:53, Simon Palmer <[EMAIL PROTECTED]> > wrote: > > Hi I have

[Numpy-discussion] Large symmetrical matrix

2008-06-10 Thread Simon Palmer
Hi I have a problem which involves the creation of a large square matrix which is zero across its diagonal and symmetrical about the diagonal i.e. m[i,j] = m[j,i] and m[i,i] = 0. So, in fact, it is a large triangular matrix. I was wondering whether there is any way of easily handling a matrix of

Re: [Numpy-discussion] numpy.linalg.eigvals crashes whn calling lapack_lite.pyd

2008-01-09 Thread Simon
Python 2.4.3 numpy 1.0.4 although this isn't python 2.5, there's clearly something up with my Windows install of numpy 1.0.4. I'll stick with numpy 1.0.3.1 for now. If anybody wants to chase down the problem with 1.0.4, let me know and I'

Re: [Numpy-discussion] numpy.linalg.eigvals crashes whn calling lapack_lite.pyd

2008-01-08 Thread Simon
Charles R Harris gmail.com> writes: > > > On Jan 8, 2008 6:49 PM, Simon gmail.com> wrote: > Newbie here. Trying to generate eigenvalues from a matrix using:print numpy.linalg.eigvals(matrix)This works with small matrices, say 5 x 5, but causes python to crash on largermatri

[Numpy-discussion] numpy.linalg.eigvals crashes whn calling lapack_lite.pyd

2008-01-08 Thread Simon
x27;t worked out if there is a specific matrix size where this starts occurring. Where to now? I can send the actual data for the matrix if need be, but as it's very large I thought it would mess up the list if I posted it here. Simon ___

Re: [Numpy-discussion] simpliest way to check: array x is float, not integer

2007-05-01 Thread Simon Berube
pe('|S3') # This could also be 'Sxxx' where xxx is the length of the largest string in the array Alternatively, as a hackjob type check you could also do an "isinstance" check on the first element of the array since, unlike lists, arrays have uniform elements all the way

Re: [Numpy-discussion] matlab vs. python question

2007-04-28 Thread Simon Berube
Use a week functions are basically function that you use for a short period of time where a full fledged well designed program is more of a waste of time than anything else. Other then that, for what you miss it really, really depends on your applications and goals. I work on signal processing and

Re: [Numpy-discussion] matlab vs. python question

2007-04-27 Thread Simon Berube
Actually, all the points in this thread have been very good points but I just want to add my 2 cents since I was in your boat just a month ago and decided to try out python after seeing what it could do. In short, I decided to look elsewhere as I was dealing with vector data in database and mainta

[Numpy-discussion] Question about Optimization (Inline and Pyrex)

2007-04-17 Thread Simon Berube
er than it actually is and I am quite frankly afraid of writing routines in one format and realizing later that it creates problems that I need to rewrite. I have tried searching for previous similar posts but could not find any. My apologies if this is a repeat or a severly dumb question. Regards, Si

Re: [Numpy-discussion] 2D Arrays column operations

2007-03-29 Thread Simon Berube
Awww, this is quite right. I kept using the a[0][:] notation and I assume I am simply pulling out single arrays from the array "list". Thank you very much for the prompt reply. (And sorry for wasting your time :P) On Mar 29, 3:46 pm, Travis Oliphant <[EMAIL PROTECTED]> wrote

[Numpy-discussion] 2D Arrays column operations

2007-03-29 Thread Simon Berube
Hi, I am relatively new to Python/NumPy switching over from Matlab and while porting some of my matlab code for practice I ran into the following problem. Assume we have a 2D Matrix such that a = array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) If I want the second row I

Re: [Numpy-discussion] ATLAS problems

2007-03-27 Thread Simon Burton
The last time I had this problem i ended up running python in gdb and setting breakpoints at the appropriate dgemm calls. That way i could see exactly what numpy was using to do dgemm. Simon. On Tue, 27 Mar 2007 10:20:41 +1000 "Justin Bedo" <[EMAIL PROTECTED]> wrote: > Hi A

Re: [Numpy-discussion] Python vector and matrix formatter similar to Matlab

2007-03-10 Thread Simon Wood
On 10 Mar 2007 16:57:30 +, Alexander Schmolck <[EMAIL PROTECTED]> wrote: "Simon Wood" <[EMAIL PROTECTED]> writes: > To all, > I came across an old thread in the archives in which Alexander Schmolck gave > an example of a Matlab like matrix formatter

[Numpy-discussion] Python vector and matrix formatter similar to Matlab

2007-03-09 Thread Simon Wood
To all, I came across an old thread in the archives in which Alexander Schmolck gave an example of a Matlab like matrix formatter he authored for Python. Is this formatter still available some where? Or has anyone else done anything similar? -Simon P.S. Here is a short example of the output

Re: [Numpy-discussion] python's random.random() faster than numpy.random.rand() ???

2007-01-27 Thread Simon Burton
On Fri, 26 Jan 2007 10:17:58 -0700 "Mark P. Miller" <[EMAIL PROTECTED]> wrote: > > for a in range(100): > b = numpy.random.rand()#numpy code what about numpy.random.rand(100) ? Simon. ___ Numpy-disc