[SciPy-user] ndimage - why is output_type deprecated ?
Wed Apr 16 10:28:49 CDT 2008
You want the 'output' parameter, which either takes a pre-allocated
array, OR a dtype.
This is a bit confusing, overloaded-API-wise, and there's also a bug
in (at least) ndimage.zoom with pre-allocated arrays(*). But the
functionality is there.
On Apr 16, 2008, at 4:23 AM, Sebastian Haase wrote:
> I have an 3d - image in uint8 pixel format and would like to use
> 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
> 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
> 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)
> Sebastian Haase
> SciPy-user mailing list
More information about the SciPy-user