<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/1292" rel="nofollow">http://projects.scipy.org/scipy/ticket/1292</a> on 2010-10-03 by trac user heroxbd, assigned to unknown.</em></p>
<p dir="auto">In minpack.py, <em>print "Warning: " msg</em> is used to print Warning messages into stdout. This is not a good idea if one want to control its warning behavior using python's warnings module.</p>
<p dir="auto">Please consider improving this.</p>
<h2 dir="auto">The issue</h2>
<ul dir="auto">
<li><a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.imread.html#scipy-ndimage-imread" rel="nofollow"><code class="notranslate">imread</code></a> is in scipy.ndimage and <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.misc.imread.html" rel="nofollow"><code class="notranslate">scipy.misc.imread</code></a></li>
<li><a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.misc.imshow.html" rel="nofollow"><code class="notranslate">imshow</code></a> and <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.misc.imsave.html" rel="nofollow"><code class="notranslate">imsave</code></a> are in scipy.misc</li>
</ul>
<p dir="auto">This seems inconsistent / unlogical from a users perspective.</p>
<h2 dir="auto">Proposed solution</h2>
<p dir="auto">Moving some to <a href="http://docs.scipy.org/doc/scipy/reference/ndimage.html#utility" rel="nofollow"><code class="notranslate">scipy.ndimage</code></a> and others to <a href="https://docs.scipy.org/doc/scipy/reference/io.html" rel="nofollow"><code class="notranslate">scipy.io</code></a>:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">scipy.misc.imshow</code> → <code class="notranslate">scipy.ndimage.imshow</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">scipy.ndimage.imread</code>, <code class="notranslate">scipy.misc.imread</code> → <code class="notranslate">scipy.io.imread</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">scipy.misc.imsave</code> → <code class="notranslate">scipy.io.imwrite</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">scipy.misc.imfilter</code> → <code class="notranslate">scipy.ndimage.imfilter</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">scipy.misc.imresize</code> → <code class="notranslate">scipy.ndimage.imresize</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">scipy.misc.imrotate</code> → <code class="notranslate">scipy.ndimage.imrotate</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">scipy.misc.ascent</code> → <code class="notranslate">scipy.ndimage.ascent</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">scipy.misc.face</code> → <code class="notranslate">scipy.ndimage.face</code></li>
</ul>
<p dir="auto">I'm not sure about the remaining <code class="notranslate">bytescale</code>, <code class="notranslate">fromimage</code>, <code class="notranslate">toimage</code>.</p>
<h2 dir="auto">What needs to be done</h2>
<ul dir="auto">
<li>Moving the code from <code class="notranslate">pilutil.py</code> to <code class="notranslate">io.py</code> (and importing the functions from <code class="notranslate">io.py</code> in <code class="notranslate">pilutil.py</code>)</li>
<li>Adding deprecation warnings to <code class="notranslate">pilutil.py</code></li>
<li>Adjusting tests</li>
<li>Adjusting documentation</li>
</ul>