update `as_array` usage
Now that #1314 is merged, we should ^discussion:
- change
as_array->asarrayas far as possible - possibly add a default argument
as_array(..., warn=True)- manually invoke
as_array(..., warn=False)to suppress warnings where intended - alternatively use
warnings.catch_warnings()@contextmanagerto temporarily suppress
- manually invoke
In CIL we started using as_array because only then we could have access to a numpy array for a number of tasks, such as regularisation. The consequences of the warning message will go beyond SIRF. I suggest we talk about this with CIL devs and agree on a path.
Are you sure you meant as_array? I wouldn't understand why you go to the "old" version.
It's been years we've been using as_array.
The Array API says to use asarray(). For SIRF, it will be vastly more efficient. So, at some point, CIL should move to asarray().