On 24. feb. 2013, at 02:20, josef.p...@gmail.com wrote:
> On Sat, Feb 23, 2013 at 3:33 PM, Robert Kern wrote:
>> On Sat, Feb 23, 2013 at 7:25 PM, Nathaniel Smith wrote:
>>> On Sat, Feb 23, 2013 at 3:38 PM, Till Stensitzki wrote:
Hello,
i know that the array object is already crowded,
On 17.01.2013 04:43, Patrick Marsh wrote:
> Thanks, everyone for chiming in. Now that I know this behavior
> exists, I can explicitly prevent it in my code. However, it would be
> nice if a warning or something was generated to alert users about the
> inconsistency between var += ... and var =
On 4. jan. 2013, at 21:42, m...@eml.cc wrote:
> Hiall,
>
>
> I am trying to embed numerical code in a mexFunction,
> as called by MATLAB, written as a Cython function.
>
> NumPy core functions and BLAS work fine, but calls to LAPACK
> function such as SVD seem to be made against to MATLAB's li
On 5. des. 2012, at 22:35, Mark Bakker wrote:
> Hello List,
>
> I want to write a large array to file, and each line can only be 80
> characters long.
> Can I use savetxt to do that? Where would I specify the maximum line length?
If you specify the format, %10.3f for instance, you will know the
On 29. okt. 2012, at 11:29, Radek Machulka wrote:
> Hi,
>
> is there a way how to save more arrays into single npy (npz if possible) file
> in loop? Something like:
>
> fw = open('foo.bar', 'wb')
> while foo:
> arr = np.array(bar)
> np.savez_compressed(fw, arr)
> fw.close()
>
> O
Hi Pierre,
first I'd like to congratulate you on a product which seems to finally solve
all the problems I have at work regarding python scripting. A portable, fully
featured python distribution is indeed very useful.
One question though: Is there a way to run winpython's IPython under cygwin,
On 3. okt. 2012, at 18:22, Chris Barker wrote:
> On Wed, Oct 3, 2012 at 9:05 AM, Paul Anton Letnes
> wrote:
>
>>> I'm not sure the problem you are trying to solve -- accumulating in a
>>> list is pretty efficient anyway -- not a whole lot overhead.
>>
On 1. okt. 2012, at 21:07, Chris Barker wrote:
> Paul,
>
> Nice to see someone working on these issues, but:
>
> I'm not sure the problem you are trying to solve -- accumulating in a
> list is pretty efficient anyway -- not a whole lot overhead.
Oh, there's significant overhead, since we're no
On 3. okt. 2012, at 17:48, Wes McKinney wrote:
> On Monday, October 1, 2012, Chris Barker wrote:
> Paul,
>
> Nice to see someone working on these issues, but:
>
> I'm not sure the problem you are trying to solve -- accumulating in a
> list is pretty efficient anyway -- not a whole lot overhead.
For convenience and clarity, this is the diff in question:
https://github.com/Dynetrekk/numpy-1/commit/5bde67531a2005ef80a2690a75c65cebf97c9e00
And this is my numpy fork:
https://github.com/Dynetrekk/numpy-1/
Paul
On Sun, Sep 30, 2012 at 4:14 PM, Paul Anton Letnes
wrote:
> Hello every
On 10. aug. 2012, at 09:54, Mark Bakker wrote:
> I am giving this a second try. Can anybody help me out?
>
> I think there is a problem with assigning a 1D complex array of length one
> to a position in another complex array.
>
> Example:
>
> a = ones(1,'D')
> b = ones(1,'D')
> a[0] = b
> --
>
> However, I got the following error message:
> error: Command "/usr/bin/g77 -g -Wall -g -Wall -shared
> build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/scipy/integrate/vodemodule.o
> build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/fortranobject.o
> -L/home/username/lib/ -L/usr/lib
Hi,
are you sure that you want g77 and not gfortran? If you want gfortran, you
should pass the
> --fcompiler=gnu95
flag to setup.py.
Which redhat version are you building on? (I don't know red hat well enough to
comment, but perhaps someone else do...)
Paul
On 6. juli 2012, at 03:00, Hung-Hsu
Hello,
I don't know exactly what went wrong. I'd start out my debugging by
1) which python # see whether you're running apple's python in /usr/bin/python,
or the one you tried to install
2) which easy_install # did you run Apple-python's easy_install, or the one you
(tried to) installed?
3) If
On 4. juli 2012, at 02:23, Sturla Molden wrote:
> Den 03.07.2012 20:38, skrev Casey W. Stark:
>>
>> Sturla, this is valid Fortran, but I agree it might just be a bad
>> idea. The Fortran 90/95 Explained book mentions this in the
>> allocatable dummy arguments section and has an example using a
On 7. juni 2012, at 10:30, Thouis (Ray) Jones wrote:
> I've opened a PR at https://github.com/numpy/numpy/pull/296 for discussion.
>
> A typical result
>
np.zeros((3,3))[[1,2,3]]
> Traceback (most recent call last):
> File "", line 1, in
> IndexError: index 3 is out of bounds for axis 0:
On 4. juni 2012, at 16:27, Thouis (Ray) Jones wrote:
> On Fri, Jun 1, 2012 at 6:56 PM, Chris Withers wrote:
>> On 01/06/2012 16:39, Benjamin Root wrote:
>>>
>>>
>>> > >>> import numpy
>>> > >>> numpy.zeros(10)[-123]
>>> > Traceback (most recent call last):
>>> > File "",
On Mon, May 14, 2012 at 9:47 PM, Ralf Gommers
wrote:
>
>
> On Sun, May 13, 2012 at 1:14 PM, Paul Anton Letnes
> wrote:
>>
>> On Sat, May 12, 2012 at 9:50 PM, Ralf Gommers
>> wrote:
>> >
>> >
>> > On Sun, May 6, 2012 at 12:12 AM, Charles
On Sat, May 12, 2012 at 9:50 PM, Ralf Gommers
wrote:
>
>
> On Sun, May 6, 2012 at 12:12 AM, Charles R Harris
> wrote:
>>
>>
>>
>> On Sat, May 5, 2012 at 2:56 PM, Paul Anton Letnes
>> wrote:
>>>
>>> Hi,
>>>
>>> I
All tests for 1.6.2rc1 pass on
Mac OS X 10.7.3
python 2.7.2
gcc 4.2 (Apple)
Great!
Paul
On 6. mai 2012, at 00:12, Charles R Harris wrote:
>
>
> On Sat, May 5, 2012 at 2:56 PM, Paul Anton Letnes
> wrote:
> Hi,
>
> I'm getting a couple of errors when testing. Sys
Hi,
I'm getting a couple of errors when testing. System:
Arch Linux (updated today)
Python 3.2.3
gcc 4.7.0
(Anything else?)
I think that this error:
AssertionError: selectedrealkind(19): expected -1 but got 16
is due to the fact that newer versions of gfortran actually supports
precision this hig
On Fri, May 4, 2012 at 12:49 AM, Keith Goodman wrote:
> On Thu, May 3, 2012 at 3:12 PM, Moroney, Catherine M (388D)
> wrote:
>
>> Here is the python code:
>>
>> def single(element, targets):
>>
>> if (isinstance(element, tuple)):
>> xelement = element[0]
>> elif (isinstance(element,
On 3. mai 2012, at 19:33, Moroney, Catherine M (388D) wrote:
> A quick recap of the problem: a 128x512 array of 7-element vectors
> (element), and a 5000-vector
> training dataset (targets). For each vector in element, I want to find the
> best-match in targets,
> defined as minimizing the Eu
On 21. apr. 2012, at 00:16, Drew Frank wrote:
> On Fri, Apr 20, 2012 at 11:45 AM, Chris Barker wrote:
>>
>> On Fri, Apr 20, 2012 at 11:39 AM, Dag Sverre Seljebotn
>> wrote:
>>> Oh, right. I was thinking "small" as in "fits in L2 cache", not small as
>>> in a few dozen entries.
>
> Another exa
ou perhaps educate me a
> little on 'literal kind values'? I take you to mean that
> 'int8' is not a literal kind value while 1 and 8 are examples of literal kind
> values.
>
> Thanks,
> John
>
>
>
> On Tue, Apr 17, 2012 at 10:12 AM, Paul Anton
Ah, come to think of it, I think that f2py only supports literal kind values.
Maybe that's your problem.
Paul
On 17. apr. 2012, at 07:58, Sameer Grover wrote:
> On Tuesday 17 April 2012 11:02 AM, John Mitchell wrote:
>> Hi,
>>
>> I am using f2py to pass a numpy array of type numpy.int8 to fort
Hi,
this probably does not help with your problem. However, I would recommend
changing your fortran code to:
subroutine print_bit_array(bits)
use iso_fortran_env
integer(kind=int8),intent(in),dimension(:)::bits
print*,'bits = ',bits
end subroutine print_bit_array
In that way you could p
On 2. apr. 2012, at 15:47, David Cournapeau wrote:
>
>
> On Sun, Apr 1, 2012 at 2:28 PM, Kamesh Krishnamurthy
> wrote:
> Hello all,
>
> I profiled NumPy EIG and MATLAB EIG on the same Macbook pro, and both were
> linking to the Accelerate framework BLAS. NumPy turns out to be ~4x slower.
As others on this list, I've also been confused a bit by the prolific numpy
interfaces to reading text. Would it be an idea to create some sort of object
oriented solution for this purpose?
reader = np.FileReader('my_file.txt')
reader.loadtxt() # for backwards compat.; np.loadtxt could instantia
On 20. feb. 2012, at 16:29, Sturla Molden wrote:
> Den 20.02.2012 08:35, skrev Paul Anton Letnes:
>> In the language wars, I have one question. Why is Fortran not being
>> considered? Fortran already implements many of the features that we want in
>> NumPy:
>
> Y
In the language wars, I have one question. Why is Fortran not being considered?
Fortran already implements many of the features that we want in NumPy:
- slicing and similar operations, at least some of the fancy indexing kind
- element-wise array operations and function calls
- array bounds-checki
>
> An example I really like is LibreOffice's "get involved" page.
>
> http://www.libreoffice.org/get-involved/
>
> Producing something similar for NumPy will take some work, but I believe it's
> needed.
Speaking as someone who has contributed to numpy in a microscopic fashion, I
agree comple
On 27. jan. 2012, at 14:52, Chao YUE wrote:
> Dear all,
>
> suppose I have a ndarray a:
>
> In [66]: a
> Out[66]: array([0, 1, 2, 3, 4])
>
> how can use it as 5X1 array without doing a=a.reshape(5,1)?
Several ways, this is one, although not much simpler.
In [6]: a
Out[6]: array([0, 1, 2, 3, 4
If by "store" you mean "store on disk", I recommend h5py datasets and
attributes. Reportedly pytables is also good but I don't have any
first hand experience there. Both python modules use the hdf5 library,
written in C/C++/Fortran.
Paul
On Wed, Jan 25, 2012 at 7:47 PM, Val Kalatsky wrote:
>
> I
On 15. jan. 2012, at 01:21, josef.p...@gmail.com wrote:
> On Sat, Jan 14, 2012 at 5:25 PM, Benjamin Root wrote:
>> On Sat, Jan 14, 2012 at 4:16 PM, Benjamin Root wrote:
>>>
>>> On Sat, Jan 14, 2012 at 4:12 PM, Charles R Harris
>>> wrote:
This sort of makes sense, but is it the 'cor
On 6. des. 2011, at 17:32, Roger Binns wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 06/12/11 01:58, Pauli Virtanen wrote:
>> I think this cannot be helped --- it does not make sense to explain
>> basic Numpy concepts in every docstring, especially `axis` and `shape`
>> are v
On 30. nov. 2011, at 12:09, Giovanni Plantageneto wrote:
> Dear all,
> I have a simple question. I would like to have all the parameters of a
> model written in a configuration file (text), and I would like to have
> all the parameters in the file automatically defined inside a program.
> I find C
Hi,
I don't know about documentation, but I always use syntax like
zeros(10, dtype=numpy.float64)
where you have dtypes like
numpy.int8
numpy.uint32
numpy.complex128 # == two numpy.float64, one for real, one for imag.
etc. This is usually less confusing to my mind. One caveat: floats above 64
bit
Hello numpy fans,
a patch and pull request for ticket 1573 has been posted, giving numpy.savetxt
the possibility to save complex arrays to text files. Formatting of the output
is supported roughly along the same lines as for real numbers.
https://github.com/numpy/numpy/pull/172
Share, test, disc
You can use the BLAS and LAPACK environment variables.
export BLAS=/path/to/libatlas.so
export LAPACK=/path/to/libatlas.so
python setup.py build
I've recently had problems with ATLAS solving equation systems
incorrectly for certain inputs with no adequate explanation.
Re-running the same simu
gt;
>
> On Mon, Aug 29, 2011 at 9:31 AM, Paul Anton Letnes <
> paul.anton.let...@gmail.com> wrote:
>
>> I recently got into trouble with these calculations (although I used
>> scipy). I actually got segfaults and "bus errors". The solution for me was
>
I recently got into trouble with these calculations (although I used scipy). I
actually got segfaults and "bus errors". The solution for me was to not link
against ATLAS, but rather link against Apple's blas/lapack libraries. That got
everything working again. I would suggest trying to install a
On 25. aug. 2011, at 23.49, David Warde-Farley wrote:
> On 2011-08-25, at 2:42 PM, Chris.Barker wrote:
>
>> On 8/24/11 9:22 AM, Anthony Scopatz wrote:
>>> You can use Python pickling, if you do *not* have a requirement for:
>>
>> I can't recall why, but it seem pickling of numpy arrays has be
Hi!
On 21. aug. 2011, at 00.18, Chris Withers wrote:
> Hi All,
>
> I've got a tree of nested dicts that at their leaves end in numpy arrays
> of identical sizes.
>
> What's the easiest way to persist these to disk so that I can pick up
> with them where I left off?
Probably giving them names
On 19. aug. 2011, at 19.57, Ian wrote:
> Right. I'm new to NumPy so I figured I'd check if there was some nifty way of
> preserving the shape without storing it in the database that I hadn't
> discovered yet. No worries, I'll store the shape alongside the array. Thanks
> for the reply.
>
I lo
On 13. aug. 2011, at 20.42, Charles R Harris wrote:
>
>
> 2011/8/11 Dmitrey
> bug in KUBUNTU 11.04, latest numpy git snapshot build with Python3
> >>> import numpy
> Traceback (most recent call last):
> File "", line 1, in
> File "/usr/local/lib/python3.2/dist-packages/numpy/__init__.py",
On 10. aug. 2011, at 21.03, Gael Varoquaux wrote:
> On Wed, Aug 10, 2011 at 04:01:37PM -0400, Anne Archibald wrote:
>> A 1 Gb text file is a miserable object anyway, so it might be desirable
>> to convert to (say) HDF5 and then throw away the text file.
>
> +1
>
> G
+1 and a very warm recomme
Looks like you have done some great work! I've been using f2py in the past, but
I always liked the idea of cython - gradually wrapping more and more code as
the need arises. I read somewhere that fortran wrapping with cython was coming
- dare I ask what the status on this is? Is it a goal for cy
(A pull request has been submitted on github, but I'm posting here so people
can discuss the user interface issues.)
As of now, the fmt= kwarg kan be (for complex dtype):
a) a single specifier, fmt='%.4e', resulting in numbers formatted like '
(%s+%sj)' % (fmt, fmt)
b) a full string specifying e
Hi!
In my quest for a bug-free numpy I have, I think, fixed ticket 1793.
https://github.com/numpy/numpy/pull/123
Enjoy - feedback welcome, of course.
Cheers,
Paul.
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailma
Hi,
I had the same problem. I think this might work:
FFLAGS='-fopenmp' f2py -c (etc)
The thing is that f2py doesn't let you pass the -fopenmp flag at the right time
to the compiler, so you have to use some sort of environment variable trick. By
the way, as far as I know, this is the case also on
Dear numpy developers, users, and fans:
I wish for a numpy that will magically detect all my errors. Barring the
invention of a numpy version which knows what I need, not what I ask of it, I
have the following, simpler wish: if one takes myarray.real or myarray.imag of
a float (or possibly inte
On 8. mai 2011, at 17.32, Warren Weckesser wrote:
>
>
> On Sun, May 8, 2011 at 7:23 PM, Charles R Harris
> wrote:
>
>
> On Sun, May 8, 2011 at 3:15 PM, Paul Anton Letnes
> wrote:
> Hi,
>
> it seems that I have found a bug in numpy.ndarray. numpy 1.5.1,
Hi,
it seems that I have found a bug in numpy.ndarray. numpy 1.5.1, python 2.7.1
from macports on mac os x 10.6.7. I got the same error on Fedora 14 with numpy
1.4.1 and python 2.7. Appending a [0] to the last line solves the problem.
% python testcrash.py
On 5. mai 2011, at 08.49, Benjamin Root wrote:
>
>
> On Wed, May 4, 2011 at 11:08 PM, Paul Anton Letnes
> wrote:
>
> On 4. mai 2011, at 20.33, Benjamin Root wrote:
>
> > On Wed, May 4, 2011 at 7:54 PM, Derek Homeier
> > wrote:
> > On 05.05.2
On 4. mai 2011, at 20.33, Benjamin Root wrote:
> On Wed, May 4, 2011 at 7:54 PM, Derek Homeier
> wrote:
> On 05.05.2011, at 2:40AM, Paul Anton Letnes wrote:
>
> > But: Isn't the numpy.atleast_2d and numpy.atleast_1d functions written for
> > this? Shouldn&
On 4. mai 2011, at 17.34, Derek Homeier wrote:
> Hi Paul,
>
> I've got back to your suggestion re. the ndmin flag for loadtxt from a few
> weeks ago...
>
> On 27.03.2011, at 12:09PM, Paul Anton Letnes wrote:
>
>>>> 1562:
>>>> I attac
On Mac OS X 10.6.7 with macports python 2.7 I get as follows:
OK (KNOWNFAIL=3, SKIP=1)
Python version:
Python 2.7.1 (r271:86832, Jan 12 2011, 10:44:27)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
% gfortran --version
GNU Fortran (GCC) 4.5.3
"Well done" to everyone working on numpy 1.6!
Paul
On 25. apr. 2011, at 19.57, Pauli Virtanen wrote:
> On Mon, 25 Apr 2011 10:16:13 -0700, Rob Beezer wrote:
> [clip]
>> Many more details and complete transcripts are at:
>> http://trac.sagemath.org/sage_trac/ticket/11248
>>
>> Any thoughts or advice to help us understand this would be greatly
>> a
On 5. apr. 2011, at 15.39, Alan G Isaac wrote:
> On 4/5/2011 9:26 AM, François Steinmetz wrote:
>> It does not change the dtype, 'int' is just interpreted as 'int64' :
>
>
> So the meaning of 'int' is system specific?
>
import numpy as np; a=np.eye(2,dtype='int'); a.dtype
> dtype('int
On 4. apr. 2011, at 16.42, Charles R Harris wrote:
>
>
> On Mon, Apr 4, 2011 at 8:29 AM, Paul Anton Letnes
> wrote:
>
> On 4. apr. 2011, at 15.34, Charles R Harris wrote:
>
> >
> >
> > On Sun, Apr 3, 2011 at 4:35 AM, Paul Anton Letnes
> >
On 4. apr. 2011, at 15.34, Charles R Harris wrote:
>
>
> On Sun, Apr 3, 2011 at 4:35 AM, Paul Anton Letnes
> wrote:
> Hi.
>
> When looking at the loadtxt/savetxt tickets, I noticed that the 're' module
> is imported in an odd place. I therefore suggest t
Hi.
When looking at the loadtxt/savetxt tickets, I noticed that the 're' module is
imported in an odd place. I therefore suggest that this import is moved to the
top of the file, in order to gather these as much as possible. I find the code
easier to read then. After all, there is no 'try / cat
On 26. mars 2011, at 21.44, Derek Homeier wrote:
> Hi Paul,
>
> having had a look at the other tickets you dug up,
>
>> My opinions are my own, and in detail, they are:
>> 1752:
>> I attach a possible patch. FWIW, I agree with the request. The
>> patch is written to be compatible with the f
Hi Derek!
On 26. mars 2011, at 15.48, Derek Homeier wrote:
> Hi again,
>
> On 26 Mar 2011, at 15:20, Derek Homeier wrote:
>>>
>>> 1562:
>>> I attach a possible patch. This could also be the default
>>> behavior to my mind, since the function caller can simply call
>>> numpy.squeeze if needed.
Hi!
I have had a look at the list of numpy.loadtxt tickets. I have never
contributed to numpy before, so I may be doing stupid things - don't be afraid
to let me know!
My opinions are my own, and in detail, they are:
1752:
I attach a possible patch. FWIW, I agree with the request. The patch
One way is to use python dicts. Pseudocode:
arrays = {}
integer = 0
for file in allfiles:
integer +=1
data = file.read()
arrays['a' + '%d' % integer] = data
I would consider using the filename as the key instead of a1, a2, etc. That way
you have that information readily a
I'm no expert, but I just pulled off the scipy+numpy+GotoBLAS2 installation.
>From what I gather, the Makefile for libgoto2 downloads and compiles the
generic lapack from netlib. It also wraps lapack into libgoto2.so/.a. I
believe the idea is as long as the BLAS implementation is fast(TM), the
lapa
On 20. mars 2011, at 16.08, Ben Smith wrote:
>
> So, in addition to my computer science work, I'm a PhD student in econ. Right
> now, the class is using GAUSS for almost everything. This sort of pisses me
> off because it means people are building libraries of code that become
> valueless whe
>
> This comes up for discussion on a fairly regular basis. I tend towards the
> more warnings side myself, but you aren't going to get the current behavior
> changed unless you can convince a large bunch of people that it is the right
> thing to do, which won't be easy. For one thing, a lot of
On 16. mars 2011, at 15.57, Dag Sverre Seljebotn wrote:
> On 03/16/2011 02:35 PM, Paul Anton Letnes wrote:
>> Heisann!
>
> Hei der,
>
>> On 16. mars 2011, at 14.30, Dag Sverre Seljebotn wrote:
>>
>>> On 03/16/2011 02:24 PM, Paul Anton Letnes wrote:
>
On 16. mars 2011, at 15.49, Chris Barker wrote:
> On 3/16/11 6:34 AM, Charles R Harris wrote:
>> On Wed, Mar 16, 2011 at 7:24 AM, Paul Anton Letnes
>
>> Yes, it is intentional. Numpy is more C than Python in this case,
>
> I don't know that C has anything to do wit
Heisann!
On 16. mars 2011, at 14.30, Dag Sverre Seljebotn wrote:
> On 03/16/2011 02:24 PM, Paul Anton Letnes wrote:
>> Hi!
>>
>> This little snippet of code tricked me (in a more convoluted form). The *=
>> operator does not change the datatype of the le
Hi!
This little snippet of code tricked me (in a more convoluted form). The *=
operator does not change the datatype of the left hand side array. Is this
intentional? It did fool me and throw my results quite a bit off. I always
assumed that 'a *= b' means exactly the same as 'a = a * b' but th
On 12. jan. 2011, at 16.40, dstaley wrote:
>
>
> Zachary Pincus-2 wrote:
>>
>>> Is it possible to use a variable in an array name? I am looping
>>> through a
>>> bunch of calculations, and need to have each array as a separate
>>> entity.
>>> I'm pretty new to python and numpy, so forgive
Mabe I am wrong somehow, but in my experience the easiest install of scipy
is 'port install py26-scipy'. For new users, I do not see why one would
recommend to build manually from source? Macports can do it for you,
automagically...
Paul
4. des.. 2010 15.04 "Ralf Gommers" :
On Sat, Dec 4, 2010
On 3. des. 2010, at 16.24, Fabian Pedregosa wrote:
> Hi all.
>
> Macports installs gfortran as part of the gcc package, but names it
> gfortran-mp-$version, without providing a symbolic link to a default
> gcfortran executable, and thus numpy.distutils is unable to find the
> right executable.
>
>
>
> On Tue, Nov 23, 2010 at 3:37 AM, Sebastian Walter
> wrote:
> On Tue, Nov 23, 2010 at 11:17 AM, Gael Varoquaux
> wrote:
> > On Tue, Nov 23, 2010 at 11:13:23AM +0100, Sebastian Walter wrote:
> >> I'm not familiar with dichotomy optimization.
> >> Several techniques have been proposed to s
78 matches
Mail list logo