On Wed, Jun 4, 2008 at 12:16 AM, Christopher Burns [EMAIL PROTECTED] wrote:
Is there a way to get the range of a numpy type? I'd like to clamp a
parameter to be within the range of a numpy type, np.uint8, np.uint32...
Something like:
if x max_value_of(np.uint8):
x =
Chris,
many thanks. Could I suggest that this information be featured
prominently in the Read Me in the Installer, and perhaps also at
http://www.scipy.org/Download where this is given as the official
binary distribution for MacOSX. You might want to change the error
message too, since I
Hi,
I noticed some odd behavior in binary_repr when the width parameter is
used. In most cases it works,
In [23]: numpy.binary_repr(1, width=8)
Out[23]: '0001'
In [24]: numpy.binary_repr(2, width=8)
Out[24]: '0010'
In [25]: numpy.binary_repr(3, width=8)
Out[25]: '0011'
In [26]:
On Wed, Jun 4, 2008 at 2:56 AM, Damian Eads [EMAIL PROTECTED] wrote:
Hi,
I noticed some odd behavior in binary_repr when the width parameter is
used. In most cases it works,
In [23]: numpy.binary_repr(1, width=8)
Out[23]: '0001'
In [24]: numpy.binary_repr(2, width=8)
Out[24]:
Robert Kern wrote:
There are a lot of them. Feel free to add any additional tests you
think are necessary, and we'll see how painful it is at build-time.
What would be acceptable ? I quickly tested on my macbook, on mac os X:
it takes ~ 2 seconds / 25 functions tests. If speed really is
Charles R Harris wrote:
It probably just grew to fix problems as they arose. It should be
possible to test for every function and fall back to the double
versions that are more reliably present. It would be nicer if all
compilers tried to conform to recent standards, i.e., be less than 9
Whoops. In one xterm, I'm going off the Fedora package and in the other,
the SVN source tree. SVN seems to work. Sorry for the unnecessary message.
On Wed, Jun 4, 2008 at 2:59 AM, Robert Kern wrote:
In [27]: numpy.binary_repr(0, width=8)
Out[27]: '0'
Is this what the output is intended
Robert,
I see your point, but why not just install a separate NumPy to run
with the system Python? That is what I have always done in the past
without problems.
I guess I always feel a sense of uncertainty with having two separate
Python installations as to which actually gets used in any
On Wed, Jun 4, 2008 at 9:25 AM, J. Stark [EMAIL PROTECTED] wrote:
Robert,
I see your point, but why not just install a separate NumPy to run
with the system Python? That is what I have always done in the past
without problems.
I think the problem is the system python already comes with a
Another way to do things which might be useful, if you're not afraid
to modify the system python install, (more-or-less suggested at
http://wiki.python.org/moin/MacPython/Leopard), is to create a
symbolic link to make everything look as if you had installed
macpython, ie
sudo ln -s
Hello all.
I'm not sure that this is the correct mailing list to post to: please excuse
me if it's not.
I've been using bvp (http://www.elisanet.fi/ptvirtan/software/bvp/index.html)
by Pauli Virtanen happily on 32 bits machines.
When I used it on 64 bits machines I found a bug that I think I've
Robin wrote:
I think theres much less chance of problems using the system python
for system things and leaving it well alone - and installing the
python.org for everyday use. The only problem with this is that the
system python works with dtrace while the normal one doesn't...
The source
On Wed, Jun 4, 2008 at 10:59 AM, David Cournapeau
[EMAIL PROTECTED] wrote:
Robin wrote:
I think theres much less chance of problems using the system python
for system things and leaving it well alone - and installing the
python.org for everyday use. The only problem with this is that the
You have to very careful when you do this. For example
the system numpy is in ../python2.5/Extras/lib/ under the
framework, while I think the numpy binary installer installs
things in ../python2.5/lib/site-packages/. So if one is not
careful one ends up with two numpy packages with all
the
Tommy Grav wrote:
I have installed Activepython on my machine (PPC w/ 10.5.3)
and it has worked more or less flawlessly.
And I've been using the python.org one for ages, also with NO issues. I
tried to use Apple's Python for a while back with 10.2, but there were
always problems, and Apple's
On Wed, Jun 4, 2008 at 6:36 PM, Christopher Barker
[EMAIL PROTECTED] wrote:
The best thing is that the system
wxPython is used, when it can be a PITA to setup correctly through
other ways.
huh? The installer provided at the wxPython pages has always worked
flawlessly for me (for the
Hello all,
I've been toying around with bundling up a numpy-using python program
for windows by using py2exe. All in all, it works great, except for
one thing: the numpy superpack installer for windows has (correctly)
selected SSE3 binary libraries to install on my machine. This causes
On Wed, Jun 4, 2008 at 2:40 AM, Robin [EMAIL PROTECTED] wrote:
On Wed, Jun 4, 2008 at 9:25 AM, J. Stark [EMAIL PROTECTED] wrote:
Robert,
I see your point, but why not just install a separate NumPy to run
with the system Python? That is what I have always done in the past
without problems.
Hi,
There is a bug renaming record array fields if some field names are
the same. I reopened this ticket
http://scipy.org/scipy/numpy/ticket/674 and attached a tiny patch.
Maybe I should have opened a new ticket. Anyway, here is an example
that causes a segfault on the latest svn version.
import
The following code fails:
from scipy import weave
from numpy import zeros
arr = zeros((10,2))
code =
PyArray_Dims dims;
dims.len = 2;
dims.ptr = Narr;
dims.ptr[0] += 10;
PyArray_Resize(arr_array, dims, 1);
weave.inline(code, ['arr'], verbose=1)
The error message is:
In function 'PyObject*
Timeseries1 = daily or weekly close of stock a
Timeseries2 = daily or weekly close of market index (spx, , etc)
Beta of stock a is what I would like to compute as explained in this article
on Wikipedia:
http://en.wikipedia.org/wiki/Beta_coefficient
I'm trying to compute the beta
I'm using python 2.5.2 on OS X, with 8 GB of ram, and a 64-bit processor.
In
this, setting, I'm working with large arrays of binary data. E.g, I want to
make calls like:
Z = numpy.inner(a,b)
where and b are fairly large -- e.g. 2 rows by 100 columns.
However, when such a call
On Wed, Jun 4, 2008 at 5:39 PM, Vineet Jain (gmail) [EMAIL PROTECTED] wrote:
Timeseries1 = daily or weekly close of stock a
Timeseries2 = daily or weekly close of market index (spx, , etc)
Beta of stock a is what I would like to compute as explained in this article
on Wikipedia:
On Wed, Jun 4, 2008 at 6:42 PM, Dan Yamins [EMAIL PROTECTED] wrote:
I'm using python 2.5.2 on OS X, with 8 GB of ram, and a 64-bit processor.
In
this, setting, I'm working with large arrays of binary data. E.g, I want
to
make calls like:
Z = numpy.inner(a,b)
where and b are
On Wed, Jun 4, 2008 at 6:04 PM, Keith Goodman [EMAIL PROTECTED] wrote:
It might also be useful to shuffle (mp.random.shuffle) the market
returns and repeat the beta calculation many times to estimate the
noise level of your beta estimates.
I guess that is more of a measure of how different
2008/6/4 Dan Yamins [EMAIL PROTECTED]:
So, I have three questions about this:
1) Why is mmap being called in the first place? I've written to Travis
Oliphant, and he's explained that numpy.inner does NOT directly do any
memory
mapping and shouldn't call mmap. Instead, it should just
Thanks Keith!
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Keith Goodman
Sent: Wednesday, June 04, 2008 9:04 PM
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] Is there a function to calculate ecnomic
beta coefficient in numpy given
I don't know much about OSX, but I do know that many malloc()
implementations take advantage of a modern operating system's virtual
memory when allocating large blocks of memory. For small blocks,
malloc uses memory arenas, but if you ask for a large block malloc()
will request a whole bunch
On Wed, Jun 4, 2008 at 9:06 PM, Charles R Harris [EMAIL PROTECTED]
wrote:
On Wed, Jun 4, 2008 at 6:42 PM, Dan Yamins [EMAIL PROTECTED] wrote:
I'm using python 2.5.2 on OS X, with 8 GB of ram, and a 64-bit processor.
In
this, setting, I'm working with large arrays of binary data. E.g, I
2008/6/4 Dan Yamins [EMAIL PROTECTED]:
Anne, thanks so much for your help. I still a little confused. If your
scenario about the the memory allocation is working is right, does that mean
that even if I put a lot of ram on the machine, e.g. 16GB, I still can't
request it in blocks larger
On Wed, Jun 4, 2008 at 7:41 PM, Dan Yamins [EMAIL PROTECTED] wrote:
On Wed, Jun 4, 2008 at 9:06 PM, Charles R Harris
[EMAIL PROTECTED] wrote:
On Wed, Jun 4, 2008 at 6:42 PM, Dan Yamins [EMAIL PROTECTED] wrote:
I'm using python 2.5.2 on OS X, with 8 GB of ram, and a 64-bit
processor.
On Wed, 2008-06-04 at 21:38 -0400, Dan Yamins wrote:
Anne, thanks so much for your help. I still a little confused. If
your scenario about the the memory allocation is working is right,
does that mean that even if I put a lot of ram on the machine, e.g.
16GB, I still can't request it in
Dan Yamins wrote:
I'm using python 2.5.2 on OS X, with 8 GB of ram, and a 64-bit
processor. In
this, setting, I'm working with large arrays of binary data. E.g, I
want to
make calls like:
Z = numpy.inner(a,b)
where and b are fairly large -- e.g. 2 rows by 100
On Wed, Jun 4, 2008 at 10:07 PM, David Cournapeau
[EMAIL PROTECTED] wrote:
On Wed, 2008-06-04 at 21:38 -0400, Dan Yamins wrote:
Anne, thanks so much for your help. I still a little confused. If
your scenario about the the memory allocation is working is right,
does that mean that
On Wed, Jun 4, 2008 at 7:41 PM, Dan Yamins [EMAIL PROTECTED] wrote:
On Wed, Jun 4, 2008 at 9:06 PM, Charles R Harris
[EMAIL PROTECTED] wrote:
On Wed, Jun 4, 2008 at 6:42 PM, Dan Yamins [EMAIL PROTECTED] wrote:
I'm using python 2.5.2 on OS X, with 8 GB of ram, and a 64-bit
processor.
Hey Dan. Now, that you mention you are using OS X, I'm fairly
confident that the problem is that you are using a 32-bit version of
Python (i.e. you are not running in full 64-bit mode and so the 4GB
limit applies).
The most common Python on OS X is 32-bit python. I think a few people
in
2008/6/4 Dan Yamins [EMAIL PROTECTED]:
Try
In [3]: numpy.dtype(numpy.uintp).itemsize
Out[3]: 4
which is the size in bytes of the integer needed to hold a pointer. The
output above is for 32 bit python/numpy.
Chuck
Check, the answer is 4, as you got for the 32-bit. What would the
On Wed, Jun 4, 2008 at 9:50 PM, Dan Yamins [EMAIL PROTECTED] wrote:
In [3]: numpy.dtype(numpy.uintp).itemsize
Out[3]: 4
which is the size in bytes of the integer needed to hold a pointer. The
output above is for 32 bit python/numpy.
Check, the answer is 4, as you got for the 32-bit.
Hi Dan,
On Wed, Jun 4, 2008 at 8:50 PM, Dan Yamins [EMAIL PROTECTED] wrote:
Try
In [3]: numpy.dtype(numpy.uintp).itemsize
Out[3]: 4
which is the size in bytes of the integer needed to hold a pointer. The
output above is for 32 bit python/numpy.
Chuck
Check, the answer is 4, as
On Wed, Jun 4, 2008 at 9:07 PM, Anne Archibald [EMAIL PROTECTED]
wrote:
2008/6/4 Dan Yamins [EMAIL PROTECTED]:
Try
In [3]: numpy.dtype(numpy.uintp).itemsize
Out[3]: 4
which is the size in bytes of the integer needed to hold a pointer. The
output above is for 32 bit
What Charles pointed out was that while the inner product is very big,
it seems to fit into memory on his 32-bit Linux machine; is it
possible that OSX is preventing your python process from using even
the meager 2-3 GB that a 32-bit process ought to get?
Yes -- I think this is what is
Dan Yamins wrote:
Hello folks,
I did port Sage and hence Python with numpy and scipy to 64 bit OSX and
below are some sample build instructions for just building python and
numpy in 64 bit mode.
Try
In [3]: numpy.dtype(numpy.uintp).itemsize
Out[3]: 4
which is the size
Dan Yamins wrote:
On Wed, Jun 4, 2008 at 9:06 PM, Charles R Harris
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
Are both python and your version of OS X fully 64 bits?
I'm not sure.
From python:
python2.5 -c 'import platform;print platform.architecture()'
('32bit', 'ELF')
43 matches
Mail list logo