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 /
I have 2 variables, say var1=10,var2=100. To divide I do either
divide(float(var1),float(var2)) or simply float(var1)/float(var2). I'm just
wondering if there's a smarter way of doing this?
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
var1 = 10
var2 = 100
import numpy as np
np.divide(var1,var2)
0
np.divide(10,100 * 1.)
0.10001
var1/var2
0
var1*1./var2
0.1
On 04/04/2011, at 8:49 PM, Alex Ter-Sarkissov wrote:
I have 2 variables, say var1=10,var2=100. To divide I do either
divide(float(var1),float(var2)) or
On 04/04/2011 01:49 PM, Alex Ter-Sarkissov wrote:
I have 2 variables, say var1=10,var2=100. To divide I do either
divide(float(var1),float(var2)) or simply float(var1)/float(var2). I'm
just wondering if there's a smarter way of doing this?
from __future__ import division
var1 = 10
var2
On 4/4/2011 6:49 AM, Alex Ter-Sarkissov wrote:
divide(float(var1),float(var2))
http://docs.scipy.org/doc/numpy/reference/generated/numpy.true_divide.html
hth,
Alan Isaac
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
On Sun, Apr 3, 2011 at 4:35 AM, Paul Anton Letnes
paul.anton.let...@gmail.com wrote:
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
On 4. apr. 2011, at 15.34, Charles R Harris wrote:
On Sun, Apr 3, 2011 at 4:35 AM, Paul Anton Letnes
paul.anton.let...@gmail.com wrote:
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
On Mon, Apr 4, 2011 at 8:29 AM, Paul Anton Letnes
paul.anton.let...@gmail.com wrote:
On 4. apr. 2011, at 15.34, Charles R Harris wrote:
On Sun, Apr 3, 2011 at 4:35 AM, Paul Anton Letnes
paul.anton.let...@gmail.com wrote:
Hi.
When looking at the loadtxt/savetxt tickets, I noticed
On 4. apr. 2011, at 16.42, Charles R Harris wrote:
On Mon, Apr 4, 2011 at 8:29 AM, Paul Anton Letnes
paul.anton.let...@gmail.com wrote:
On 4. apr. 2011, at 15.34, Charles R Harris wrote:
On Sun, Apr 3, 2011 at 4:35 AM, Paul Anton Letnes
paul.anton.let...@gmail.com wrote:
On Mon, Apr 4, 2011 at 8:57 AM, Paul Anton Letnes
paul.anton.let...@gmail.com wrote:
On 4. apr. 2011, at 16.42, Charles R Harris wrote:
On Mon, Apr 4, 2011 at 8:29 AM, Paul Anton Letnes
paul.anton.let...@gmail.com wrote:
On 4. apr. 2011, at 15.34, Charles R Harris wrote:
On 03/31/2011 12:02 PM, Derek Homeier wrote:
On 31 Mar 2011, at 17:03, Bruce Southey wrote:
This is an invalid ticket because the docstring clearly states that in
3 different, yet critical places, that missing values are not handled
here:
Each row in the text file must have the same number
On Mon, Apr 4, 2011 at 9:59 AM, Bruce Southey bsout...@gmail.com wrote:
On 03/31/2011 12:02 PM, Derek Homeier wrote:
On 31 Mar 2011, at 17:03, Bruce Southey wrote:
This is an invalid ticket because the docstring clearly states that in
3 different, yet critical places, that missing values
On 04/04/2011 11:20 AM, Charles R Harris wrote:
On Mon, Apr 4, 2011 at 9:59 AM, Bruce Southey bsout...@gmail.com
mailto:bsout...@gmail.com wrote:
On 03/31/2011 12:02 PM, Derek Homeier wrote:
On 31 Mar 2011, at 17:03, Bruce Southey wrote:
This is an invalid ticket because
On Mon, Apr 4, 2011 at 11:01 AM, Bruce Southey bsout...@gmail.com wrote:
On 04/04/2011 11:20 AM, Charles R Harris wrote:
On Mon, Apr 4, 2011 at 9:59 AM, Bruce Southey bsout...@gmail.com wrote:
On 03/31/2011 12:02 PM, Derek Homeier wrote:
On 31 Mar 2011, at 17:03, Bruce Southey wrote:
Hi,
I think that I have resolved my issue down to creating a structured
string array.
I am using numpy version '2.0.0.dev-3c338cb'.
Without a structured array, it should be a 2 by 2 array:
np.array([('a','b'),('c','d')])
array([['a', 'b'],
['c', 'd']],
dtype='|S1')
I just checkout out the 1.6 branch, attempted to install with python3:
RefactoringTool: Line 695: You should use a for loop here
Running from numpy source directory.Traceback (most recent call last):
File setup.py, line 196, in module
setup_package()
File setup.py, line 170, in
Going through some of the recent threads on similar problems, I'm
trying to discern which is best.
I have X is T x i, theta is T x i x j. I want a T by j array that
contains X[t].T.dot(theta[t]) along axis 0.
Say,
T,i,j = 166,7,3
X = np.random.random((T,i))
theta = np.random.random((T,i,j))
#
Hi Bruce,
I think that I have resolved my issue down to creating a structured
string array.
I am using numpy version '2.0.0.dev-3c338cb'.
Without a structured array, it should be a 2 by 2 array:
np.array([('a','b'),('c','d')])
array([['a', 'b'],
['c', 'd']],
dtype='|S1')
On Mon, Apr 4, 2011 at 9:15 PM, Darren Dale dsdal...@gmail.com wrote:
I just checkout out the 1.6 branch, attempted to install with python3:
I hope you mean the 1.6.0b1 tarball, not the current branch head? This
problem is (or should have been) fixed.
Just tried again with python3.2 and
On Mon, Apr 4, 2011 at 3:31 PM, Ralf Gommers
ralf.gomm...@googlemail.com wrote:
On Mon, Apr 4, 2011 at 9:15 PM, Darren Dale dsdal...@gmail.com wrote:
I just checkout out the 1.6 branch, attempted to install with python3:
I hope you mean the 1.6.0b1 tarball, not the current branch head? This
On Mon, Apr 4, 2011 at 1:31 PM, Ralf Gommers ralf.gomm...@googlemail.comwrote:
On Mon, Apr 4, 2011 at 9:15 PM, Darren Dale dsdal...@gmail.com wrote:
I just checkout out the 1.6 branch, attempted to install with python3:
I hope you mean the 1.6.0b1 tarball, not the current branch head? This
On 4 Apr 2011, at 21:41, Darren Dale wrote:
Just tried again with python3.2 and 1.6.0b2, installs fine. The line
it fails on is only reached when a numpy/version.py exists, which is
the case for source releases or if you did not clean your local git
repo before building.
... but I think
Hi,
I am pleased to announce the availability of the second beta of NumPy
1.6.0. Due to the extensive changes in the Numpy core for this
release, the beta testing phase will last at least one month. Please
test this beta and report any problems on the Numpy mailing list.
Many bug fixes went in
Hi all,
On 4 Apr 2011, at 22:04, Ralf Gommers wrote:
I am pleased to announce the availability of the second beta of NumPy
1.6.0. Due to the extensive changes in the Numpy core for this
release, the beta testing phase will last at least one month. Please
test this beta and report any
On Mon, Apr 4, 2011 at 8:42 PM, Derek Homeier
de...@astro.physik.uni-goettingen.de wrote:
Hi all,
On 4 Apr 2011, at 22:04, Ralf Gommers wrote:
I am pleased to announce the availability of the second beta of NumPy
1.6.0. Due to the extensive changes in the Numpy core for this
release,
On Mon, Apr 4, 2011 at 11:42 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Mon, Apr 4, 2011 at 8:42 PM, Derek Homeier
de...@astro.physik.uni-goettingen.de wrote:
Hi all,
On 4 Apr 2011, at 22:04, Ralf Gommers wrote:
I am pleased to announce the availability of the second beta
On 4/4/2011 1:04 PM, Ralf Gommers wrote:
Hi,
I am pleased to announce the availability of the second beta of NumPy
1.6.0. Due to the extensive changes in the Numpy core for this
release, the beta testing phase will last at least one month. Please
test this beta and report any problems on
On Tue, Apr 5, 2011 at 12:10 AM, Christoph Gohlke cgoh...@uci.edu wrote:
On 4/4/2011 1:04 PM, Ralf Gommers wrote:
Hi,
I am pleased to announce the availability of the second beta of NumPy
1.6.0. Due to the extensive changes in the Numpy core for this
release, the beta testing phase will
On 4/4/11 9:03 PM, josef.p...@gmail.com wrote:
On Mon, Apr 4, 2011 at 11:42 PM, Charles R Harris
File /sw/lib/python2.4/site-packages/numpy/lib/_datasource.py,
line 477, in open
return _file_openers[ext](found, mode=mode)
IOError: invalid mode: Ub
Guess that wasn't tested before
On Mon, Apr 4, 2011 at 11:22 PM, Chris Barker chris.bar...@noaa.gov wrote:
On 4/4/11 9:03 PM, josef.p...@gmail.com wrote:
On Mon, Apr 4, 2011 at 11:42 PM, Charles R Harris
File /sw/lib/python2.4/site-packages/numpy/lib/_datasource.py,
line 477, in open
return
30 matches
Mail list logo