Skip to content

Support writes if dimensions are different but data size is compatible #119

@emmenlau

Description

@emmenlau

I would like to kindly request a feature. Currently I can not write i.e. a 1D buffer of size [6] into a 2D dataset of dimensions [6, 1]. I see how the current behavior makes sense from a point of view. But the number of elements and their type would be compatible. Therefore it would be great to transparently support this.

My suggestion: Support all writes, if at least one of the following is true:

  • The dimensions match (current behaviour).
  • The number of elements match, and the mismatching dimensions have size 1 (new feature request).

I understand that if at least one of the two is true, then the arrays can be considered "compatible". This would allow to treat i.e. a 2D vector with a single row or column the same as a 1D vector. This is something my users commonly do. It would be great to support this transparently.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions