RF: remove unused import
RF: get slope/inter from proxy object in test

The slope and intercept will be set to NaN on image creation in a little
while, but the slope/inter in the proxy object will always reflect the
loaded header (not the image header)   Get the slope/inter from there.
API: image creation sets scaling to NaN, NaN

Creating an image automatically sets the slope / inter to NaN, NaN for
Analyze types supporting slope / inter
NF: implement / test explicit scaling for Analyze

Add logic to allow explicit scaling for Analyze-type images and add
tests.
NF: add function returning supoorted np types.

Function returns supported numeric numpy types for objects like headers
or images.
TST: test for explicit scaling of scaleable images

Add tests for all data type combinations when scaling is explicit, not
calculated.
NF: add safe allclose testing function

allclose fails for extreme ints because subtraction can cause overflow /
underflow, and abs leaves negatives for the min of an int.
RF: refactor writing tests for complex input

Need some violent refactoring for complex input to array_to_file; begin
by getting the tests ready for complex input.
RF+TST: major refactor of array_to_file

I was getting confused adding complex numbers so time for a rewrite.

The function is still far too long, and often very difficult to
understand.

Add tests for complex scaling and no scaling cases.
DOC: how to run image load save benchmark
DOC+TST: doc and test nan value for array_to_file

The nan2zero step in array_to_file effectively comes before applying the
intercept and slope.  I'd forgotten that, and why - note in docstring
and test.
DOC+RF: document private write function

And change the argument order to follow the order in which the arguments
are applied.
NF: add benchmark for save of image with NaN

Image save is slow with NaNs, benchmark for testing fixes.
TST: more nan thresholding tests, remove duplicate

Add NaN to comprehensive tests of in / out with array_to_file.  Remove
test that has become a subset of the more comprehensive test.  Rename
the comprehensive test to better match what it does.
BF+TST: add error and tests for nasty nan2zero bug

It is possible to make the written range of the data not include the
data that represents the scaled 0 for reconstructing zero from NaNs.

Add some tests, some failing, to confirm or deny this is happening.
TST: adapting scaling tests to error

The nan2zero check causes errors I didn't intend for some other tests;
disable nan2zero check in those cases.
RF: refactor nan2zero errors

Check nan_fill by casting as the output type.
TST: extend nan2zero tests

Add tests to show that nan gets translated to the same value as 0 if
nan2zero is set.
API+TST: errors for bad scaling in array_to_file

It's time consuming to test for NaNs when converting from integers to
integers, and we don't want to check whether nan2zero value is within
range if there can be no NaNs, so raise errors for scaling that will
generate NaNs.  Next we add tests to confirm that we're not checking the
nan2zero nan_fill value for int to int scaling.
TST: fix nan2zero tests, test nanfill for ints

The tests for int types were broken because I was setting nan2zero to
False.