648d4d50901749951a7350637d57c574a527a6ba,mahotas/convolve.py,,convolve,#,31
Before Change
"""
if f.dtype != weights.dtype:
weights = weights.astype(f.dtype)
if output is not None:
if output.dtype != f.dtype: raise ValueError("mahotas.convolve: `output` has wrong type")
if output.shape != f.shape: raise ValueError("mahotas.convolve: `output` has wrong shape")
if not output.flags["CONTIGUOUS"]: raise ValueError("mahotas.convolve: `output` is not c-array")
if mode not in modes:
raise ValueError("mahotas.convolve: `mode` not in %s" % modes)
if mode == "constant" and cval != 0.:
raise NotImplementedError("Please email mahotas developers to get this implemented.")
After Change
if f.dtype != weights.dtype:
weights = weights.astype(f.dtype)
output = _get_output(f, output, "convolve")
_check_mode(mode, cval, "convolve")
return _convolve.convolve(f, weights, output, mode2int[mode])
def median_filter(f, Bc=None, mode="reflect", cval=0.0, output=None):
"""
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 21
Instances
Project Name: luispedro/mahotas
Commit Name: 648d4d50901749951a7350637d57c574a527a6ba
Time: 2011-06-23
Author: luis@luispedro.org
File Name: mahotas/convolve.py
Class Name:
Method Name: convolve
Project Name: luispedro/mahotas
Commit Name: 648d4d50901749951a7350637d57c574a527a6ba
Time: 2011-06-23
Author: luis@luispedro.org
File Name: mahotas/convolve.py
Class Name:
Method Name: rank_filter
Project Name: luispedro/mahotas
Commit Name: 648d4d50901749951a7350637d57c574a527a6ba
Time: 2011-06-23
Author: luis@luispedro.org
File Name: mahotas/convolve.py
Class Name:
Method Name: median_filter