[Numpy-discussion] concatenate, doc-string

Arnd Baecker arnd.baecker at web.de
Wed Apr 26 02:39:05 EDT 2006


Hi,

the doc-string of concatentate is pretty short:

numpy.concatenate?
Docstring:
    concatenate((a1,a2,...),axis=None).

Would the following be better:
"""
concatenate((a1, a2,...), axis=None) joins the tuple  `(a1, a2, ...)` of
sequences (or arrays) into a single numpy array.

Example::

  print concatenate( ([0,1,2], [5,6,7]))
"""

((The ``(or arrays)`` could be omitted if sequences include array by
default, though it might not be obvious to beginners ...))

I was also tempted to suggest a dtype argument,
  concatenate( ([0,1,2], [5,6,7]), dtype=numpy.Float)
but I am not sure if that would be a good idea ...

Best, Arnd




More information about the NumPy-Discussion mailing list