dataObject.dstack(...) should always return an object of higher number of dimensions

Issue #79 closed
M. Gronle
created an issue

Until now, the output of dataObject.dstack([obj1, obj2,...]) depends on the input tuple. If the only one object is given as tuple, this object is returned as it is. If more than one object is given, a new object is returned with an additional axis (first axis) and the objects are stacked along this new first axis.

In order to provide a consistent behaviour of this method, it is proposed to always return an object with a prepended new axis, even if the input tuple only consists of one object.

Example:

obj = dataObject.zeros([10,15])
stackedobj = dataObject.dstack([obj,])
print(stackedobj.shape) #will return [1,10,15]

Comments (1)

  1. Log in to comment