[Pkg-exppsy-pymvpa-dev] array of length 1
Michael Hanke
michael.hanke at gmail.com
Tue Dec 15 14:30:09 UTC 2009
On Thu, Dec 10, 2009 at 11:54:39AM +0100, Valentin Haenel wrote:
> Hi Everyone,
>
> regarding the zero dim array:
> ------------------------------
>
> Its important in the argument checking for the Sphere object:
>
> # type checking
> coordinate = N.asanyarray(coordinate)
> if __debug__:
> if coordinate.size != 3 \
> or coordinate.dtype.char not in N.typecodes['AllInteger']:
> raise ValueError("Sphere must be called on a sequence of integers of "
> "length 3, you gave: "+ str(coordinate))
>
> In case the coordinate is just a single number, using len(coordinate) would
> fail. Maybe i am just doing the type check wrong, or maybe i shouldn't be doing
> a type check at all?
Exactly. I won't check it at all -- or make it conditional under __debug__.
> regarding the mailinglist
> ------------------------------
>
> There seems to be a pymvpa-dev mailinglist, maybe it would be time to start
> using that. Its not like we want to bore our users with implementation details?
>
> http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa-dev/
Posted to that list ;-)
Michael
--
GPG key: 1024D/3144BE0F Michael Hanke
http://mih.voxindeserto.de
More information about the Pkg-exppsy-pymvpa-dev
mailing list