Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
It seems like what you want to do can be achieved by using data.assign_coords(t=[0.123]) The error message is extremely confusing in this respect, but it seems like the new value for the coordi...
Answer
#1: Initial revision
It seems like what you want to do can be achieved by using ```python data.assign_coords(t=[0.123]) ``` The error message is extremely confusing in this respect, but it seems like the new value for the coordinate must have the same shape as the original coordinate value. In this case, `data.t.shape` would output `(1, )`, which corresponds to the shape of a vector. Therefore, you also have to specify a vector-like input. Here, I used a list, but you could also use a numpy array or compute the new entry from the original value, e.g. ```python data.assign_coords(t=data.t + 0.123) ``` Of course, this assumes that `data.t` is zero everywhere (and not just on the edges).