hanjinliu / coords-array

N-Dimensional array implemented with slicing, transformation and interpolation in a coordinate-based manner.
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Improved coordinate system #6

Open hanjinliu opened 2 years ago

hanjinliu commented 2 years ago

Terminologies

Expected API

hanjinliu commented 2 years ago

Space should also implement array constructors.

space = Space(["z", "y", "x"])
arr = space.zeros((10, 20, 30), dtype=np.float32)  # 3D array with zyx-axes

Specifying the type of axis may be useful.

space = Space(angle="periodic", channel="category", y="linear", x="linear")
arr = space.zeros((10, 3, 20, 30))
arr = space.zeros((10, 3, 20, 30), channel=["R", "G", "B"])  # ??