When I use column_stack
to concatenate NumPy
arrays, the dtype
gets converted:
a = numpy.array([1., 2., 3.], dtype=numpy.float64)
b = numpy.array([1, 2, 3], dtype=numpy.int64)
print numpy.column_stack((a, b)).dtype
>>> float64
Is there a way to preserve the dtype
of the individual columns?