dimensions of zero length
![](https://secure.gravatar.com/avatar/ba366a43ea0322ddb4cf2462f8ad2596.jpg?s=120&d=mm&r=g)
Hi all, I noticed that in Numeric and in numarray it is possible to create arrays with axes of zero length. For instance: zeros([1, 0]). There seems not be much that can be done with them. What is the reason for their existence? My real question is: When writing an extension in C, how to deal with such arrays? Should I treat them as empty arrays, that do not have any data? Cheers, Peter -- Dr. Peter J. Verveer Cell Biology and Cell Biophysics Programme EMBL Meyerhofstrasse 1 D-69117 Heidelberg Germany Tel. : +49 6221 387245 Fax : +49 6221 387242 Email: Peter.Verveer@embl-heidelberg.de
![](https://secure.gravatar.com/avatar/a53ea657e812241a1162060860f698c4.jpg?s=120&d=mm&r=g)
<verveer@embl-heidelberg.de> writes:
They often result as special cases from some operations. Think of them as the array equivalents of empty lists. Creating zero-size arrays explicitly can be useful when suitable starting values for iterations are needed.
My real question is: When writing an extension in C, how to deal with such arrays? Should I treat them as empty arrays, that do not have any data?
Exactly. Konrad.
![](https://secure.gravatar.com/avatar/a53ea657e812241a1162060860f698c4.jpg?s=120&d=mm&r=g)
<verveer@embl-heidelberg.de> writes:
They often result as special cases from some operations. Think of them as the array equivalents of empty lists. Creating zero-size arrays explicitly can be useful when suitable starting values for iterations are needed.
My real question is: When writing an extension in C, how to deal with such arrays? Should I treat them as empty arrays, that do not have any data?
Exactly. Konrad.
participants (2)
-
Konrad Hinsen
-
verveer@embl-heidelberg.de