nix icon indicating copy to clipboard operation
nix copied to clipboard

Create dimensions during DataArray creation

Open stoewer opened this issue 8 years ago • 3 comments

Pass information about dimensions to DataArray's create method. The goal is to have a similar behavior as in the prototype:

DataArray da = block.createDataArray("da", "signal", nix::DataType::Double, {D("ms", "Time", 0.1)})

Further all methods to set or append dimensions should be removed and it should not be possible to change the unit of existing dimensions (or at least not to an incompatible unit).

This is a major API change and has a huge impact on the bindings and the documentation of the c++ API and the bindings.

stoewer avatar Aug 10 '15 07:08 stoewer

This is related to issue #519.

gicmo avatar Aug 10 '15 21:08 gicmo

I think I kinda agree with this. It makes sense to me that dimensions should be automatically created when the data is created and should not be done with appends after; it's a bit unintuitive currently. However, I do think it may make sense to allow the changing of dimension type afterwards. Perhaps at creation it should create a default dimension for every dimension (if not specified explicitly), but allow replacing the type later.

matham avatar Jan 10 '17 18:01 matham

I think I like the idea of creating default dimensions too. We could automatically create SetDimensions signifying that by default, data in DataArrays are simply just a collection of values, until the dimensionality is specified.

achilleas-k avatar Jan 12 '17 12:01 achilleas-k