Only write base array of a view when explicitly requested
From #989, the current ASDF behavior of writing the underlying base array of a Numpy view can lead to unexpected results, like a file being much bigger than anticipated when the view is a small portion of the base array. Of course, this behavior can lead to space savings when multiple views of the base array are in the ASDF file. But rather than try to infer whether to enable this behavior based on expected space savings, the simpler behavior is to make this opt-in, probably via an arg to write_to or the ASDF config.
Agree. It would be nice to not try to infer intentions, but make intentions explicit in a kwarg.
So is the suggestion to then make a copy before writing out, and only keep the base/view if explicitly asked? That seems sane to me.