Re: NumPy arrays that use memory allocated from other libraries or tools

2008-09-11 Thread Travis Oliphant
sturlamolden wrote: On Sep 10, 6:39 am, Travis Oliphant <[EMAIL PROTECTED]> wrote: I wanted to point anybody interested to a blog post that describes a useful pattern for having a NumPy array that points to the memory created by a different memory manager than the standard one used by

NumPy arrays that use memory allocated from other libraries or tools

2008-09-09 Thread Travis Oliphant
http://blog.enthought.com/?p=62 Best regards, -Travis Oliphant -- http://mail.python.org/mailman/listinfo/python-list

Re: Committing latest patch on Issue 708374 to SVN (adding offset to mmap)

2007-10-22 Thread Travis Oliphant
Travis Oliphant wrote: > Hi all, > > I think the latest patch for fixing Issue 708374 (adding offset to mmap) > should be committed to SVN. > > I will do it, if nobody opposes the plan. I think it is a very > important addition and greatly increases the capabili

Committing latest patch on Issue 708374 to SVN (adding offset to mmap)

2007-10-22 Thread Travis Oliphant
Hi all, I think the latest patch for fixing Issue 708374 (adding offset to mmap) should be committed to SVN. I will do it, if nobody opposes the plan. I think it is a very important addition and greatly increases the capability of the mmap module. Thanks, -Travis Oliphant -- http

Re: Database in memory

2007-04-09 Thread Travis Oliphant
Jim wrote: > I have an application that will maintain an in-memory database in the > form of a list of lists. Does anyone know of a way to search for and > retreive "records" from such a structure? > Actually, the new NumPy can work as a very-good fast and efficient simple in-memory database (o

Re: An error of matrix inversion using NumPy

2007-04-04 Thread Travis Oliphant
lancered wrote: > > >So, can you tell me what goes wrong? Is this a bug in > Numpy.linalg? How to deal with this situation? If you need, I can > post the matrix I used below, but it is so long,so not at the moment. > As you discovered, it is very likely your problem is a very high co

Re: Python equivalents to MATLAB str2func, func2str, ischar, isfunc?

2007-03-14 Thread Travis Oliphant
dmitrey wrote: > I can't find these via web serch > You won't find exact equivalents. But, the same functionality is available. Perhaps you would like to show us what you are trying to do in Python. Python's eval has some similarity with str2func Python's repr() or str() has some similarity

Re: Direct memory access

2007-03-07 Thread Travis Oliphant
Collin Stocks wrote: > Does anyone know how to directly handle memory using python? > I want to be able, for example, to copy the actual contents of a memory > address, or set the actual contents of a memory address. This kind of thing is generally not what Python is used for, so it's not really

Re: export an array of floats to python

2007-02-22 Thread Travis Oliphant
Peter Wuertz wrote: > Hi, > > I'm writing a C module for python, that accesses a special usb camera. > This module is supposed to provide python with data (alot of data). Then > SciPy is used to fit the data. > Which version of scipy are you using? > My question is, how to make python read fr

Re: Two dimensional lists

2007-01-25 Thread Travis Oliphant
Laszlo Nagy wrote: >># shouldn't I be able to fill the lists simply by pointing to a location? >> >>matrix[a_idx, p_idx] = 0x219 # and so on? >> > > Lists are not matrices. For example: > > L = [ [1,2,3], ['a','b','c'], 10 ] > print L[1][2] # Prints 'c', you will like this syntax but... > prin

Re: why scipy cause my program slow?

2007-01-17 Thread Travis Oliphant
Robert Kern wrote: > HYRY wrote: > >>Why the exec time of test(readdata()) and test(randomdata()) of >>following program is different? >>my test file 150Hz10dB.wav has 2586024 samples, so I set randomdata >>function >>to return a list with 2586024 samples. >>the exec result is: >>2586024 >> >>10.8

Re: numpy numbers converted wrong

2006-10-26 Thread Travis Oliphant
robert wrote: > in Gnuplot (Gnuplot.utils) the input array will be converted to a Numeric > float array as shown below. When I insert a numpy array into Gnuplot like > that below, numbers 7.44 are cast to 7.0 > Why is this and what should I do ? Is this bug in numpy or in Numeric? > > > [Dbg]>

Re: numpy slice: create view, not copy

2006-10-12 Thread Travis Oliphant
K. Jansma wrote: > Hi, > > given an array: > > import numpy > a = numpy.arange(100).reshape((10,10)) > print a > > [[ 0 1 2 3 4 5 6 7 8 9] > [10 11 12 13 14 15 16 17 18 19] > [20 21 22 23 24 25 26 27 28 29] > [30 31 32 33 34 35 36 37 38 39] > [40 41 42 43 44 45 46 47 48 49] > [50 5

Re: switching to numpy and failing, a user story

2006-10-04 Thread Travis Oliphant
[EMAIL PROTECTED] wrote: > Travis E. Oliphant wrote: > > > Given the quality of python's (free) documentation and how good it's > been for a very long time, it's bit ironic to be using the phrase > "normal open-source documentation" on this mailing list. Numeric > python, which numpy aspires to b

Re: iterator question

2006-09-29 Thread Travis Oliphant
Neal Becker wrote: > Any suggestions for transforming the sequence: > > [1, 2, 3, 4...] > Where 1,2,3.. are it the ith item in an arbitrary sequence > > into a succession of tuples: > > [(1, 2), (3, 4)...] > > In other words, given a seq and an integer that specifies the size of tuple > to retu

Re: Computing correlations with SciPy

2006-03-17 Thread Travis Oliphant
[EMAIL PROTECTED] wrote: > I want to compute the correlation between two sequences X and Y, and > tried using SciPy to do so without success.l Here's what I have, how > can I correct it? > This was a bug in NumPy (inherited from Numeric actually). The fix is in SVN of NumPy. Here are the new v

[ANN] NumPy 0.9.6 released

2006-03-14 Thread Travis Oliphant
This post is to announce the release of NumPy 0.9.6 which fixes some important bugs and has several speed improvments. NumPy is a multi-dimensional array-package for Python that allows rapid high-level array computing with Python. It is successor to both Numeric and Numarray. More informatio

Comments sought for PEP 357 --- allowing any object in slice syntax

2006-03-03 Thread Travis Oliphant
Any Object to be Used for Slicing Version: $Revision: 42549 $ Last Modified: $Date: 2006-02-21 21:00:18 -0700 (Tue, 21 Feb 2006) $ Author: Travis Oliphant <[EMAIL PROTECTED]> Status: Draft Type: Standards Track Created: 09-Feb-2006 Python-Version: 2.5 Abstract This PEP proposes add

Re: cannot install scipy

2006-02-06 Thread Travis Oliphant
Robert Kern wrote: > nitro wrote: > >>Hi, >> >>I am using a Debian system. I installed NumPy and everything works >>well. When I try to install SciPy, I get the following error. Any help >>would be appreciated. >> >>=== >>[EMAIL PROTECTED]:~/scipy/scipy-0.4.4$ python setup.py install >>import core

ANN: SciPy Core (Numeric Python Replacement) Version 0.4.X (beta) released

2005-09-30 Thread Travis Oliphant
. The LICENSE is still a BSD style License---the same as old Numeric. More information can be found at the web-site: http://numeric.scipy.org The primary developer of scipy core (besides the original creators of Numeric upon which it is based) is Travis Oliphant ([EMAIL PROTECTED]), but his

Distutils spawn on unix acting strange

2005-03-10 Thread Travis Oliphant
ll again and it finds the recent build and goes forward). I also don't get the mysterious errror when I just cut-and-paste the compile line. I am very confused. Has anyone seen this or anything like this before? Any help appreciated. -Travis Oliphant -- http://mail.python.org/mailman/listinfo/python-list

Nevow examples

2005-02-24 Thread Travis Oliphant
to add the capability for users to update the documentation through the web-site. But, that functionality is not complete. The code itself is available in the util directory of scipy which can be checked out of CVS (or browsed). Go to http://www.scipy.org for mor details. -Travis Oliphant