[SciPy-Dev] docstring standard: parameter shape description

Pierre Haessig pierre.haessig@crans....
Thu Jan 31 07:47:23 CST 2013


Hi Joe,

Le 30/01/2013 00:06, Joe Harrington a écrit :
> So, you can't have a 0-element dimension in an array that is not already
> 0-size.  I didn't think about 0-size arrays having some non-zero
> dimensions.  I guess that makes mathematical sense, but then what is the
> point?
>
> Between this and your bug report, I wonder whether a 0-element array
> dimension is a feature you can rely on.  Can a developer let us know if
> it's an accident that it works at all?  I'll leave it to you to start a
> new thread on this and get the inconsistencies resolved, since you're
> the one using the feature.  The report was last touched 3 years ago.
Just to say that back in 2009 I was programming a modeling tool to get
the state space representation of any (linear) electrical circuit and
empty arrays were useful in avoiding painful special casing.

Within the algorithm there is a block-partioning of the incidence matrix
of the circuit graph. Partitioning is dictated by the different kinds of
circuit elements. Thus, some of these blocks could be empty and it was
very useful that such (0,N) or (M,0) arrays could propagate smoothly in
the rest of the algorithm.

best,
Pierre

(This being said, I cannot tell how well numpy dealt with the empty
array arithmetic... because it was in Matlab ! Mea culpa ;-) )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
Url : http://mail.scipy.org/pipermail/scipy-dev/attachments/20130131/c032eb6f/attachment.bin 


More information about the SciPy-Dev mailing list