Hi all,
How can I obtain the position of the minus sign within the
following string ?
liste[1]
'1.5-te'
Nils
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
A Thursday 23 April 2009, Nils Wagner escrigué:
Hi all,
How can I obtain the position of the minus sign within the
following string ?
liste[1]
'1.5-te'
That's easy by using basic weaponery in Python:
In [8]: liste[1].find('-')
Out[8]: 3
In [9]: liste[1][3]
Out[9]: '-'
--
Francesc
On Thu, Apr 23, 2009 at 1:24 AM, Gökhan SEVER gokhanse...@gmail.com wrote:
Ahaa,,
Thanks Gaël. That method is more elegance than the previous inputs, and the
simplest of all.
Although one line of import this says:
There should be one-- and preferably only one --obvious way to do it.
I
Hi,
I stumbled upon something I think is a bug in scipy:
In [4]: stats.randint(1.,15.).ppf([.1,.2,.3,.4,.5])
Out[4]: array([ 2., 3., 5., 6., 7.])
When you pass float arguments to stats.randint and then call the ppf method,
you get an array of floats, which clearly wrong. The rvs method
Hi,
I looked more in detail on what would be needed to port numpy to
py3k. In particular, I was interested at the possible strategies to
keep one single codebase for both python 2.x and python 3.x. The first
step is to remove all py3k warnings reported by python 2.6. A couple
of recurrent
2009/4/20 Wes McKinney wesmck...@gmail.com:
I assume that, because NaN != NaN, even though both have the same hash value
(hash(NaN) == -32768), that Python treats any NaN double as a distinct key
in a dictionary.
In [76]: a = np.repeat(nan, 10)
In [77]: d = {}
In [78]: for i, v in
Thu, 23 Apr 2009 22:38:21 +0900, David Cournapeau kirjoitti:
[clip]
I looked more in detail on what would be needed to port numpy to
py3k. In particular, I was interested at the possible strategies to keep
one single codebase for both python 2.x and python 3.x. The first step
is to remove
David Cournapeau wrote:
Hi,
I looked more in detail on what would be needed to port numpy to
py3k. In particular, I was interested at the possible strategies to
keep one single codebase for both python 2.x and python 3.x. The first
step is to remove all py3k warnings reported by python
josef.pktd at gmail.com writes:
setmember1d is very fast compared to the other solutions for large b.
However, setmember1d requires that both arrays only have unique elements.
So it doesn't work if, for example, your first array is a data vector
with member ship in different groups
On Thu, Apr 23, 2009 at 9:56 AM, josef.p...@gmail.com wrote:
On Thu, Apr 23, 2009 at 9:27 AM, Flavio Coelho fccoe...@gmail.com wrote:
Hi,
I stumbled upon something I think is a bug in scipy:
In [4]: stats.randint(1.,15.).ppf([.1,
.2,.3,.4,.5])
Out[4]: array([ 2., 3., 5., 6., 7.])
josef.p...@gmail.com wrote:
2009/4/20 Wes McKinney wesmck...@gmail.com:
I assume that, because NaN != NaN, even though both have the same hash value
(hash(NaN) == -32768), that Python treats any NaN double as a distinct key
in a dictionary.
In [76]: a = np.repeat(nan, 10)
In [77]: d =
On Thu, Apr 23, 2009 at 11:20 PM, Pauli Virtanen p...@iki.fi wrote:
Thu, 23 Apr 2009 22:38:21 +0900, David Cournapeau kirjoitti:
[clip]
I looked more in detail on what would be needed to port numpy to
py3k. In particular, I was interested at the possible strategies to keep
one single
On Thu, Apr 23, 2009 at 11:21 PM, Bruce Southey bsout...@gmail.com wrote:
I agree that a single code base should be used if possible however there
are a lot of C code changes required as well as Python code changes:
http://www.scipy.org/Python3k
On Thu, Apr 23, 2009 at 2:56 PM, josef.p...@gmail.com wrote:
On Thu, Apr 23, 2009 at 9:27 AM, Flavio Coelho fccoe...@gmail.com wrote:
Hi,
I stumbled upon something I think is a bug in scipy:
In [4]: stats.randint(1.,15.).ppf([.1,
.2,.3,.4,.5])
Out[4]: array([ 2., 3., 5., 6.,
On Thu, Apr 23, 2009 at 9:52 AM, David Cournapeau courn...@gmail.comwrote:
On Thu, Apr 23, 2009 at 11:20 PM, Pauli Virtanen p...@iki.fi wrote:
Thu, 23 Apr 2009 22:38:21 +0900, David Cournapeau kirjoitti:
[clip]
I looked more in detail on what would be needed to port numpy to
py3k. In
Ryan May wrote:
On Thu, Apr 23, 2009 at 9:52 AM, David Cournapeau courn...@gmail.com
But replacing print is not as easy as reduce. Things like print
yoyo, a do not work, for example.
I think the point is that you can just change it to print(yoyo) which
will work in both python 2.x
On Thu, Apr 23, 2009 at 11:23 AM, Christopher Barker
chris.bar...@noaa.govwrote:
Ryan May wrote:
On Thu, Apr 23, 2009 at 9:52 AM, David Cournapeau courn...@gmail.com
But replacing print is not as easy as reduce. Things like print
yoyo, a do not work, for example.
I think the
On Thu, Apr 23, 2009 at 11:18 AM, Flavio Coelho fccoe...@gmail.com wrote:
On Thu, Apr 23, 2009 at 2:56 PM, josef.p...@gmail.com wrote:
On Thu, Apr 23, 2009 at 9:27 AM, Flavio Coelho fccoe...@gmail.com wrote:
Hi,
I stumbled upon something I think is a bug in scipy:
In [4]:
Hi all,
I'm building numpy 1.3.0 from source with libatlas-sse2-dev from the jaunty
repos. I'm running into 16 failures when running the nose test.
This is a fresh install of 9.04 and i've repod the following packages:
build-essential
swig
gfortran
python-dev
libatlas-sse2-dev
libatlas-base-dev
Thu, 23 Apr 2009 14:54:10 -0400, Chris Colbert wrote:
[clip]
libatlas-sse2-dev
[clip]
The pastebin links to site.cfg build.log and test.log are at the end of
this email. If anyone could help me out here as to what the problems may
be, i would appreciate it!
The SSE-optimized Atlas libraries
On Thu, Apr 23, 2009 at 09:52, David Cournapeau courn...@gmail.com wrote:
On Thu, Apr 23, 2009 at 11:20 PM, Pauli Virtanen p...@iki.fi wrote:
Thu, 23 Apr 2009 22:38:21 +0900, David Cournapeau kirjoitti:
[clip]
I looked more in detail on what would be needed to port numpy to
py3k. In
Pauli Virtanen wrote:
Thu, 23 Apr 2009 14:54:10 -0400, Chris Colbert wrote:
[clip]
libatlas-sse2-dev
[clip]
The pastebin links to site.cfg build.log and test.log are at the end of
this email. If anyone could help me out here as to what the problems may
be, i would appreciate it!
The
On Thu, Apr 23, 2009 at 15:39, Robert Kern robert.k...@gmail.com wrote:
On Thu, Apr 23, 2009 at 09:52, David Cournapeau courn...@gmail.com
wrote:
On Thu, Apr 23, 2009 at 11:20 PM, Pauli Virtanen p...@iki.fi wrote:
Thu, 23 Apr 2009 22:38:21 +0900, David Cournapeau kirjoitti:
[clip]
I
On Fri, Apr 24, 2009 at 7:59 AM, Michael Abshoff
michael.absh...@googlemail.com wrote:
Pauli Virtanen wrote:
Thu, 23 Apr 2009 14:54:10 -0400, Chris Colbert wrote:
[clip]
libatlas-sse2-dev
[clip]
The pastebin links to site.cfg build.log and test.log are at the end of
this email. If anyone
Hi! I'd like to suggest a patch for:
numpy
http://docs.scipy.org/numpy/docs/numpy/.corehttp://docs.scipy.org/numpy/docs/numpy.core/
.fromnumeric http://docs.scipy.org/numpy/docs/numpy.core.fromnumeric/.put
The docstring contains:
for i, val in zip(ind,v):
x.flat[i]=val
It should be:
for i,
Christopher Barker wrote:
Though I'm a bit surprised that that's not how the print function is
written in the first place (maybe it is in py3k -- I'm testing on 2.5)
That's actually how it works as far as I can tell. The thing with
removing those print is that we can do it without too much
Hi William
Please sign up for an account on the docs editor at
http://docs.scipy.org
Regards
Stéfan
2009/4/24 william ratcliff william.ratcl...@gmail.com:
Hi! I'd like to suggest a patch for:
numpy.core.fromnumeric.put
[...]
This would be more consistent with the rest of the docstring.
I signed up for an account as williamratcliff
May I have edit rights?
Thanks,
William
2009/4/24 Stéfan van der Walt ste...@sun.ac.za
Hi William
Please sign up for an account on the docs editor at
http://docs.scipy.org
Regards
Stéfan
2009/4/24 william ratcliff
28 matches
Mail list logo