[SciPy-user] ndimage - why is output_type deprecated ?
Sebastian Haase
haase at msg.ucsf.edu
Wed Apr 16 04:23:39 EDT 2008
Hi,
I have an 3d - image in uint8 pixel format and would like to use
ndimage.gaussian_filter().
The doctring says:
""" .... The intermediate arrays are
stored in the same data type as the output. Therefore, for output
types with a limited precision, the results may be imprecise
because intermediate results may be stored with insufficient
precision.
"""
Since I don't have an output array allocated a-priory, it would be
convenient if I could specify that I want the output to be of dtype
np.float32.
So I thought about adding a "dtype" argument to the function
definition in filters.py.
However: I found that this function in turn calls
_ni_support._get_output(output, input)
and _ni_support._get_output(output, input) already had an optional
`output_type` argument,
which however is "deprecated" -- really it causes even a "raise
RuntimeError" (so it's actually already beyond deprecated ....)
Does anyone here know why that was taken out !?
I would like to put it back (just calling it "dtype=None" -- None
meaning "same as input", and ignored [maybe one should raise an
exception !?] if output is specified)
Thanks,
Sebastian Haase
More information about the SciPy-User
mailing list