What's wrong?
start python shell;
from numpy import sin => all ok
from numpy import repmat =>
Traceback (most recent call last):
File "", line 1, in
ImportError: cannot import name repmat
D.
___
Numpy-discussion mailing list
Numpy-discussion@sci
On 29/04/07, David Goldsmith <[EMAIL PROTECTED]> wrote:
> Far be it from me to challenge the mighty Wolfram, but I'm not sure that
> using the *formula* for calculating the arctan of a *single* complex
> argument from its real and imaginary parts makes any sense if x and/or y
> are themselves compl
On 4/29/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> On 4/29/07, Jim Jewett <[EMAIL PROTECTED]> wrote:
> > On 4/29/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > > Hmm... Maybe the conclusion to draw from this is that we shouldn't
> > > make Ring a class? Maybe it ought to be a metaclass,
Far be it from me to challenge the mighty Wolfram, but I'm not sure that
using the *formula* for calculating the arctan of a *single* complex
argument from its real and imaginary parts makes any sense if x and/or y
are themselves complex (in particular, does Lim(formula), as the
imaginary part
On 4/29/07, Jim Jewett <[EMAIL PROTECTED]> wrote:
> On 4/29/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > Hmm... Maybe the conclusion to draw from this is that we shouldn't
> > make Ring a class? Maybe it ought to be a metaclass, so we could ask
> > isinstance(Complex, Ring)?
>
> Yes; all the
On 4/29/07, Jim Jewett <[EMAIL PROTECTED]> wrote:
> Or isexample, so that we aren't locked into implementing ABCs as base classes.
You don't have to use the feature even if it exists. :-)
I think there are good reasons to support overriding
isinstance/issubclass beyond ABCs.
--
--Guido van Ross
On 4/29/07, Steven Bethard <[EMAIL PROTECTED]> wrote:
> On 4/29/07, Talin <[EMAIL PROTECTED]> wrote:
> > If it were technically possible, I would recommend that this PEP have to
> > run the same gauntlet that any other large library addition would, which
> > is to go through a long period of commun
On 4/29/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> Hmm... Maybe the conclusion to draw from this is that we shouldn't
> make Ring a class? Maybe it ought to be a metaclass, so we could ask
> isinstance(Complex, Ring)?
Yes; all the ABCs are assertions about the class. (Zope interfaces do
s
On 4/29/07, Talin <[EMAIL PROTECTED]> wrote:
> Guido van Rossum wrote:
> > Maybe we should stop trying to capture radically different
> > mathematical number systems using classes or types, and limit
> > ourselves to capturing the systems one learns in high school: C, R, Q,
> > Z, and (perhaps) N (
On 4/29/07, Jeffrey Yasskin <[EMAIL PROTECTED]> wrote:
> On 4/28/07, Baptiste Carvello <[EMAIL PROTECTED]> wrote:
> > 2) In the PEP, the concepts are used *inconsistently*. Complex derives from
> > Ring
> > because the set of complex numbers *is a* ring. Int derives from Complex
> > because
> > i
2007/4/29, Anton Sherwood <[EMAIL PROTECTED]>:
> Anton Sherwood wrote:
> > I'm using eigenvectors of a graph's adjacency matrix as "topological"
> > coordinates of the graph's vertices as embedded in 3space (something I
> > learned about just recently). Whenever I've done this with a graph
that
On 4/29/07, Kevin Jacobs <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
wrote:
On 4/29/07, Andrew Straw <[EMAIL PROTECTED]> wrote:
>
> No, the nth index of a Python sequence is a[n], where n starts from
> zero. Thus, if I want the nth dimension of array a, I want a.shape[n].
>
> I reverted the page to
On 4/29/07, Andrew Straw <[EMAIL PROTECTED]> wrote:
No, the nth index of a Python sequence is a[n], where n starts from
zero. Thus, if I want the nth dimension of array a, I want a.shape[n].
I reverted the page to its original form and added a couple explanatory
comments about zero vs one based
On 4/29/07, Andrew Straw <[EMAIL PROTECTED]> wrote:
> No, the nth index of a Python sequence is a[n], where n starts from
> zero. Thus, if I want the nth dimension of array a, I want a.shape[n].
>
> I reverted the page to its original form and added a couple explanatory
> comments about zero vs one
On Sun, 29 Apr 2007, Andrew Straw apparently wrote:
> No, the nth index of a Python sequence is a[n], where n starts from
> zero. Thus, if I want the nth dimension of array a, I want a.shape[n].
So now we have no seventh day of the week?
Even the Python reference manual has Monday as the *fir
I think it's better to add "see remark!" inside the cells
because not all people read the text from 4th column
and this can lead to serious mistakes and lot of time elapsed for bug
hunting.
WBR, D.
Andrew Straw wrote:
> No, the nth index of a Python sequence is a[n], where n starts from
> zero. T
No, the nth index of a Python sequence is a[n], where n starts from
zero. Thus, if I want the nth dimension of array a, I want a.shape[n].
I reverted the page to its original form and added a couple explanatory
comments about zero vs one based indexing.
dmitrey wrote:
> now there is
> MATLAB
You make your point, but I would expect a behaviour similar to Mathematica
or Matlab.
From http://documents.wolfram.com/mathematica/functions/ArcTan
"If x or y is complex, then ArcTan[x, y] gives . When , ArcTan[x, y] gives
the number such that and ."
Lorenzo.
On 4/29/07, David Goldsmith <[EM
> Anton Sherwood wrote:
> > I'm using eigenvectors of a graph's adjacency matrix as "topological"
> > coordinates of the graph's vertices as embedded in 3space (something I
> > learned about just recently). Whenever I've done this with a graph that
> > *does* have a good 3d embedding, using the fi
On 4/28/07, Baptiste Carvello <[EMAIL PROTECTED]> wrote:
> 2) In the PEP, the concepts are used *inconsistently*. Complex derives from
> Ring
> because the set of complex numbers *is a* ring. Int derives from Complex
> because
> integer are complex numbers (or, alternatively, the set of integers
On 4/29/07, dmitrey <[EMAIL PROTECTED]> wrote:
> now there is
> MATLABNDArray Matrix
> size(a,n) a.shape[n] a.shape[n]
>
> but it should be
> size(a,n) a.shape[n-1] a.shape[n-1]
I made the change. But how should we change the comment?
I'll take a stab at this one; if I miss the mark, people, please chime in.
What's "strange" here is not numpy's behavior but octave's (IMO).
Remember that, over R, arctan is used in two different ways: one is
simply as a map from (-inf, inf) -> (-pi/2,pi/2) - here, let's call that
invtan; the
now there is
MATLABNDArray Matrix
size(a,n) a.shape[n] a.shape[n]
but it should be
size(a,n) a.shape[n-1] a.shape[n-1]
WBR, D.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
h
On 4/29/07, Anton Sherwood <[EMAIL PROTECTED]> wrote:
> Anton Sherwood wrote:
> I refined it slightly:
>
> val,vec = numpy.linalg.eig(adj)
> indx = val.argsort()[-4:-1]
> val = val.take(indx)
> vec = vec.take(indx, axis=1)
> master = zip(val, vec.T)
Charles R Harris wrot
Anton Sherwood wrote:
>> Anton Sherwood wrote:
>> I refined it slightly:
>>
>> val,vec = numpy.linalg.eig(adj)
>> indx = val.argsort()[-4:-1]
>> val = val.take(indx)
>> vec = vec.take(indx, axis=1)
>> master = zip(val, vec.T)
>
> Charles R Harris wrote:
>> But that won't ge
Weird behaviour with arctan2(complex,complex).
Take a look at this:
In [11]: numpy.arctan2(1.,1.)
Out[11]: 0.785398163397
In [12]: numpy.arctan2(1j,1j)
---
exceptions.AttributeErrorTraceback (mos
hi all,
please inform me what is the simplest way to check, does the vector x
that came to my func is float or integer. I.e. someone can pass to my
func for example x0 = numpy.array([1, 0, 0]) and it can yield wrong
unexpected results vs numpy.array([1.0, 0, 0]) .
Thx, D.
_
> Anton Sherwood wrote:
> I refined it slightly:
>
> val,vec = numpy.linalg.eig(adj)
> indx = val.argsort()[-4:-1]
> val = val.take(indx)
> vec = vec.take(indx, axis=1)
> master = zip(val, vec.T)
Charles R Harris wrote:
> But that won't get the 4 largest, and will ignore
28 matches
Mail list logo