[SciPy-user] Inconsistent function calls?
Thu May 21 11:13:18 CDT 2009
2009/5/21 Robert Kern <firstname.lastname@example.org>
> > I do not see any python imposed limitation at making ones(3,3) by default
> > returning
> > what ones([3,3]) does, the same way random.rand(3,3) does,
> As has been said several times already, there is one: ones() takes an
> optional second argument, the dtype. That is the Python-imposed
Robert, by following this list I know that I shouldn't even try to respond
to your message as
you always turn out to be right, but I'll try anyway. Yes, there is a
limitation if you
take into account that that is how ones() is implemented now, but there is
no limitation that
prevents this function from being modified. But, as you said, rand() and
rand() are not
the norm but the exception, so that is fine.
> BTW, the reason why I included that error message in my previous message
> > because
> > I think it is completely non-helpful.
> It's telling you exactly what the problem is, but it is necessarily
> brief and general-purpose. It can't read your mind to try to figure
> out what you expected to happen and tailor its message to that. Any
> time you see an error with arguments, you should always then read the
> function's docstring which should enlighten you more thoroughly.
How about "The second argument is not dtype"? Still brief ...
> Robert Kern
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
> -- Umberto Eco
> SciPy-user mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user