From: Konrad H. <hi...@cn...> - 2002-11-24 18:03:29
|
<ve...@em...> writes: > 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? 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. |