Re: [Numpy-discussion] What is consensus anyway

2012-04-25 Thread Adam Hughes
I too have to agree with Andreas. I have been using Numpy for years in my work, but am not versed in C so I don't even understand what numpy is doing under the hood. I too would only be able to contribute to the code at the python level, or as Andreas said, at improving SciPy packages and other N

Re: [Numpy-discussion] apply 'getitem to each element of obj array?

2012-04-05 Thread Adam Hughes
If you are storing objects, then can't you store them in a list and just do: for obj in objectlist: obj.attribute = value Or am I misunderstanding? On Thu, Apr 5, 2012 at 11:31 AM, Neal Becker wrote: > I have an array of object. > > How can I apply attribute access to each element? > > I

Re: [Numpy-discussion] numpy videos

2012-03-12 Thread Adam Hughes
aset is so large that you cannot afford to have several data structures that are holding it simultanesouly in your code. On Mon, Mar 12, 2012 at 6:23 PM, Abhishek Pratap wrote: > Super awesome. I love how the python community in general keeps the > recordings available for free. > > @Adam

Re: [Numpy-discussion] numpy videos

2012-03-12 Thread Adam Hughes
Abhi, One thing I would suggest is to tackle numpy with a particular focus. Once you've gotten the basics down through tutorials and videos, do you have a research project in mind to use with numpy? On Mon, Mar 12, 2012 at 6:08 PM, Skipper Seabold wrote: > On Mon, Mar 12, 2012 at 6:04 PM, Abhis

Re: [Numpy-discussion] Forbidden charcter in the "names" argument of genfromtxt?

2012-02-20 Thread Adam Hughes
Thanks for clearing that up. On Mon, Feb 20, 2012 at 1:58 PM, Skipper Seabold wrote: > On Mon, Feb 20, 2012 at 1:35 PM, Brett Olsen > wrote: > > On Sat, Feb 18, 2012 at 8:12 PM, Adam Hughes > wrote: > >> Hey everyone, > >> > >> I have timeseries

Re: [Numpy-discussion] Forbidden charcter in the "names" argument of genfromtxt?

2012-02-20 Thread Adam Hughes
x27;s all part of a learning curve. I'll keep in mind that the period may cause problems later; however, as far as I can tell so far, there's nothing going wrong when I access the data. On Mon, Feb 20, 2012 at 1:35 PM, Brett Olsen wrote: > On Sat, Feb 18, 2012 at 8:12 PM, Adam Hughes

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Adam Klein
On Feb 19, 2012, at 10:38 AM, Sturla Molden wrote: Den 19.02.2012 10:52, skrev Mark Wiebe: C++ removes some of this advantage -- now there is extra code generated by > the compiler to handle constructors, destructors, operators etc which can > make a material difference to fast inner loops. S

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Adam Klein
On Feb 19, 2012, at 2:18 AM, Mark Wiebe wrote: The suggestion of transitioning the NumPy core code from C to C++ has sparked a vigorous debate, and I thought I'd start a new thread to give my perspective on some of the issues raised, and describe how such a transition could occur. First, I'd lik

[Numpy-discussion] Forbidden charcter in the "names" argument of genfromtxt?

2012-02-18 Thread Adam Hughes
Hey everyone, I have timeseries data in which the column label is simply a filename from which the original data was taken. Here's some sample data: name1.txt name2.txt name3.txt 32 34953 32 03402 I've noticed that the standard genfromtxt() me

[Numpy-discussion] segfault on searchsorted (1.6.2.dev-396dbb9)

2012-01-17 Thread Adam Klein
Hello, I get a segfault here: In [1]: x = np.array([1,2,3], dtype='M') In [2]: x.searchsorted(2, side='left') But it's fine here: In [1]: x = np.array([1,2,3], dtype='M') In [2]: x.view('i8').searchsorted(2, side='left') Out[2]: 1 This segfaults again: x.view('i8').searchsorted(np.datetime64(

[Numpy-discussion] numpy int64_t incompatibility on OSX

2011-12-23 Thread Adam Klein
build, in setup.py. Has anyone had this sort of incompatibility on OSX? Suggestions as to correct way to deal with it? Thanks, Adam On Mon, Dec 19, 2011 at 1:37 PM, mark florisson wrote: > >> On 19 December 2011 00:04, Adam Klein wrote: >> > Hi all, >> > >>

Re: [Numpy-discussion] Problem installing NumPy with Python 3.2.2/MacOS X 10.7.2

2011-12-18 Thread McNicol, Adam
Hi, Definitely have the sdk installed. In the Developer/SDKs directory I have one for 10.6 and another for 10.7 - no idea where a second 10.6 would be coming from =( Adam. -Original Message- From: numpy-discussion-requ...@scipy.org [mailto:numpy-discussion-requ...@scipy.org] Sent

Re: [Numpy-discussion] Problem installing NumPy with Python 3.2.2/MacOS X 10.7.2

2011-12-18 Thread McNicol, Adam
27;t quite right with something. I have placed ** before the lines that appear in red. I appreciate the suggestions, Thanks again, Adam. running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc unifing config_

Re: [Numpy-discussion] Problem installing NumPy with Python 3.2.2/MacOS X 10.7.2

2011-12-17 Thread McNicol, Adam
installer from Python.org so I have no idea whether Python.h is present or where indeed I would find it or how I would add it to the search path. Do I have to install from source or something like that? Thanks again, Adam. -Original Message- From: McNicol, Adam Sent: Fri 12/16/2011 1

[Numpy-discussion] Problem installing NumPy with Python 3.2.2/MacOS X 10.7.2

2011-12-16 Thread McNicol, Adam
ot compile 'Python.h'. Perhaps you need to "\ SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel. I have got no idea what to do with this error message. Any help would be much appreciated. Kind Regards, Adam. ___

[Numpy-discussion] multiple 2d vs n-dimensional arrays

2010-09-10 Thread Adam
I'm keeping a large number of data points in multiple 2d arrays, for example: class c(object): def __init__(self): self.a = np.zeros((24, 60)) self.b = np.zeros((24, 60)) ... After processing the data, I'm serializing these to disk for future reference/post-pro

Re: [Numpy-discussion] numpy-1.4.0 no longer available for download?

2010-02-15 Thread Adam Mercer
Ahhh I see this is due to the ABI change, sorry for the noise. Cheers Adam On Mon, Feb 15, 2010 at 21:00, Adam Mercer wrote: > Hi > > According to the NumPy download page > <http://sourceforge.net/projects/numpy/files/> the latest available > version is 1.3.0, what happene

[Numpy-discussion] numpy-1.4.0 no longer available for download?

2010-02-15 Thread Adam Mercer
Hi According to the NumPy download page <http://sourceforge.net/projects/numpy/files/> the latest available version is 1.3.0, what happened to 1.4.0? Apologies if I've missed some announcement. Cheers Adam ___ NumPy-Discussion mailing

Re: [Numpy-discussion] double-precision sqrt?

2009-10-17 Thread Adam Ginsburg
Hi again, I apologize, the mistake was entirely my own. Sqrt's do the right thing.... Adam On Sat, Oct 17, 2009 at 12:17 PM, Adam Ginsburg wrote: > My code is actually wrong but I still have the problem I've > identified that sqrt is leading to precision errors.  Sorry abo

Re: [Numpy-discussion] double-precision sqrt?

2009-10-17 Thread Adam Ginsburg
My code is actually wrong but I still have the problem I've identified that sqrt is leading to precision errors. Sorry about the earlier mistake. Adam On Sat, Oct 17, 2009 at 12:08 PM, Adam Ginsburg wrote: > > sqrt(float64(1.034324523462345)) > # 1.0170174646791199 >

[Numpy-discussion] double-precision sqrt?

2009-10-17 Thread Adam Ginsburg
I simply being obtuse? Thanks, Adam Example code: from scipy.optimize.minpack import fsolve from numpy import sqrt sqrt(float64(1.034324523462345)) # 1.0170174646791199 f=lambda x: x**2-float64(1.034324523462345)**2 f(sqrt(float64(1.034324523462345))) # -0.03550269637326231 fsolve(f,1.01) # 1.0343

Re: [Numpy-discussion] F2PY error with G95 on Mac OS 10.5

2009-06-10 Thread Adam Mercer
On Wed, Jun 10, 2009 at 15:19, Samir Unni wrote: > That's odd. You're running Mac OS 10.5.7? Did you install NumPy > manually or via Fink? Yep Intel 10.5.7, installed from MacPorts. Cheers Adam ___ Numpy-discussion mailing list

Re: [Numpy-discussion] F2PY error with G95 on Mac OS 10.5

2009-06-10 Thread Adam Mercer
Compiler --fcompiler=sun Sun or Forte Fortran 95 Compiler --fcompiler=vast Pacific-Sierra Research Fortran 90 Compiler For compiler details, run 'config_fc --verbose' setup command. $ Cheers Adam ___ Numpy-discussion mailing list

Re: [Numpy-discussion] F2PY error with G95 on Mac OS 10.5

2009-06-10 Thread Adam Mercer
2): no suitable image found.  Did find: >        /Users/srunni/src/pdb2pqr/pdb2pqr/tinker/src/tinker/source/ese.so: > unknown file type, first eight bytes: 0x80 0xC0 0x4F 0x00 0xEB 0x57 > 0xE0 0x8F > > when I attempt to import the generated mod

Re: [Numpy-discussion] scipy 0.7.1rc2 released

2009-06-06 Thread Adam Mercer
On Fri, Jun 5, 2009 at 06:09, David Cournapeau wrote: > Please test it ! I am particularly interested in results for scipy > binaries on mac os x (do they work on ppc). Test suite passes on Intel Mac OS X (10.5.7) built from source: OK (KNOWNFAIL=6, SKIP=21) Cheers

Re: [Numpy-discussion] numpy.ma.arg{min,max}

2009-04-10 Thread Adam Oliner
roughly the behavior I want with 'where': >>> a array([1, 1, 1, 5, 5]) >>> numpy.ma.where(a==numpy.ma.max(a))[0] array([3, 4]) >>> numpy.ma.where(a==numpy.ma.min(a))[0] array([0, 1, 2]) - Adam J. Oliner oli...@cs.stanford.edu On Apr 10, 2009,

[Numpy-discussion] numpy.ma.arg{min,max}

2009-04-10 Thread Adam Oliner
, 5, 5]) >>> numpy.ma.argmax(a) 3 >>> numpy.ma.argmin(a) 0 I was expecting to get more than one index for both calls. Am I doing something wrong or misreading the documentation? - Adam J. Oliner oli...@cs.stanford.edu ___ Numpy-dis

Re: [Numpy-discussion] Python2.4 support

2008-12-08 Thread Adam Mercer
version on many OS (mac > os X 10.4 I believe, RHEL for sure, open solaris). Mac OS X 10.4 uses python-2.3, 10.5 uses python-2.5. Cheers Adam ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] "Advanced indexing" question - subset of data cube as a 2D array.

2008-10-29 Thread Adam Ginsburg
;t seem to be going to the > right places when I re-examined them. I think I answered my own question: if I'd used zeros() instead of ones() it would have worked fine. I don't know why I tried to use ones(). Adam ___ Numpy-discussion mailing

[Numpy-discussion] "Advanced indexing" question - subset of data cube as a 2D array.

2008-10-28 Thread Adam
.net/): In [85]: bi = (f.bolo_indices[np.newaxis,:]+ones([7751,1])).astype('int') In [86]: whc = (whscan[:,np.newaxis] + ones([1,107])).astype('int') In [87]: array2d[whc,bi] = temp2d I thought this had worked, but the values didn't seem to be going to the right place

Re: [Numpy-discussion] Request for Python 2.6 win32 package

2008-10-17 Thread Adam Foster
numpy 1.2 is not buildable with python 2.6. You will have to wait > for a later version, most probably 1.3, > Ok thanks David, guess I will have to wait till I can leverage the new IEEE 754 support in python 2.6 ___ Numpy-discussion mailing list Numpy-di

[Numpy-discussion] Request for Python 2.6 win32 package

2008-10-17 Thread Adam Foster
Please add numpy 1.2.0 win32 package for python 2.6 ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Specifying a fortran compiler on numpy build.

2008-06-20 Thread Adam Mercer
don't > have to specify anything. Thanks for the clarification. Cheers Adam ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Specifying a fortran compiler on numpy build.

2008-06-20 Thread Adam Mercer
Hi If I specify a fortran compiler when building numpy, does that have any effect on what is installed? In other words, must I build numpy against a fortran compiler in order to successfully build and use extension written in fortran - such as scipy? Cheers Adam

Re: [Numpy-discussion] planet.scipy.org

2008-01-02 Thread Adam Mercer
t the page doesn't exist, however the scipy home page, i.e. http://www.scipy.org, now appears to be the planet aggregator is this just a temporary DNS issue? Cheers Adam ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.sci

Re: [Numpy-discussion] appending extra items to arrays

2007-10-11 Thread Adam Mercer
gt; Total Time with list: 0.0469707035741 > > > > Hope this helps, That is helpful, I thought that using arrays would be much faster but its clearly not in this case. Thanks Adam

Re: [Numpy-discussion] appending extra items to arrays

2007-10-11 Thread Adam Mercer
st wondering if there was a better way to do it. Cheers Adam ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] appending extra items to arrays

2007-10-10 Thread Adam Mercer
need for the list, as the array object doesn't seem to have an append() method? Cheers Adam ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Convert array type

2007-10-08 Thread Adam Mercer
On 08/10/2007, Robert Kern <[EMAIL PROTECTED]> wrote: > Use sep=' '. As the docstring says, if sep is empty, then the string is > interpreted as binary data. If it is not empty, then the string is interpreted > as ASCII. Thanks, got it the wrong way round. That

Re: [Numpy-discussion] Convert array type

2007-10-08 Thread Adam Mercer
6 1.18295070e-076 ..., 5.45168074e-067 2.11101912e-052 6.58519056e-260] where using values = array(wavearray.split()).astype(float) print values results in the correct [ 0.e+00 0.e+00 0.e+00 ..., 4.22233200e-23 3.86799900e-23 3.48452000

Re: [Numpy-discussion] Convert array type

2007-10-06 Thread Adam Mercer
On 07/10/2007, Gary Ruben <[EMAIL PROTECTED]> wrote: > Try using astype. This works: > > values = array(wavearray.split()).astype(float) Thanks Gary, that does the trick. Cheers Adam ___ Numpy-discussion mailing list Numpy-discussion

[Numpy-discussion] Convert array type

2007-10-06 Thread Adam Mercer
array element with a sequence. Cheers Adam ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] multinomial error?

2007-08-05 Thread adam . powell
why i need to loop over a large number of single-trial events, rather than just replacing the loop with a large number of trials in one single multinomial pick (annoying, as that's so much quicker!). Thanks for any help, Adam ___ Numpy-discussion ma

Re: [Numpy-discussion] Overload binary operators with custo m array type

2007-01-12 Thread Adam Jenkins
Travis Oliphant ieee.org> writes: > > Adam Jenkins wrote: > > I just tried it, and it does solve the problem for the > > mathematical operators like + and -, but doesn't seem to work for > > the comparison operators. That is, if I write > > > > lhs

Re: [Numpy-discussion] Overload binary operators with custo m array type

2007-01-12 Thread Adam Jenkins
y_priority__. Is this intentional that the comparison operators ignore __array_priority__, or just a bug in ndarray? Thanks again. Adam ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Overload binary operators with custom array type

2007-01-12 Thread Adam Jenkins
ay involves transferring all the array data to the python process. For various reasons, for my application it's preferable that I handle binary operators with mixed numpy/myarray operand types myself, rather than converting the myarray object to a numpy.ndarray. T