On Mon, Sep 2, 2013 at 3:55 PM, Stéfan van der Walt <[email protected]>
wrote:
>
> On Mon, Sep 2, 2013 at 4:21 PM, Gregorio Bastardo
> <[email protected]> wrote:
> >>>> np.min_scalar_type([-1,256]) # int16 expected
> > dtype('int32')
> >
> > Am I missing something? Anyone knows how to achieve the desired
operation?
>
> The docstring states explicitly that this use case is not supported.
>
> Here's one way of doing it: https://gist.github.com/stefanv/6413742

You can probably reduce the amount of work by only comparing a.min() and
a.max() instead of the whole array.

--
Robert Kern
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to