should be noted that this is not a suitable replacement if you just
want to use a different, existing, dtype, e.g. from ml_dtypes, this is a
completely flexible solution for any dtype with complete control of
rounding/quantization, including stochastic quantization.
BR Oscar Gustafsson
(I will not
er. (Didn't
read it before starting writing this.) Quite a lot of interesting
discussions, especially the legacy argument.
BR Oscar Gustafsson
(FWIW, I suggested that NumPy should be able to round to a given number of
bits, or arbitrary base, primarily as a way to fake (short) fixed-point
repr
the spring, so
primarily asking for planning and describing the project a bit better.
BR Oscar
Den tors 10 nov. 2022 kl 15:13 skrev Sebastian Berg <
sebast...@sipsolutions.net>:
> On Thu, 2022-11-10 at 14:55 +0100, Oscar Gustafsson wrote:
> > Den tors 10 nov. 2022 kl 13:10 skrev Se
Den tors 10 nov. 2022 kl 13:10 skrev Sebastian Berg <
sebast...@sipsolutions.net>:
> On Thu, 2022-11-10 at 11:08 +0100, Oscar Gustafsson wrote:
> > >
> > > I'm not an expert, but I never encountered rounding floating point
> > > numbers
> > >
he quant function,
https://www.mathworks.com/help/deeplearning/ref/quant.html which basically
supports arbitrary bases (as a special case of an even more general
approach). So there may be other use cases (although the example basically
just implements around(x, 1)).
BR
Den tis 8 nov. 2022 kl 11:44 skrev Sebastian Berg <
sebast...@sipsolutions.net>:
> On Thu, 2022-11-03 at 11:37 +0100, Oscar Gustafsson wrote:
> > Hi all,
> >
> > I hope this is the correct way to propose a new feature.
> > https://github.com/numpy/numpy/is
. Provide a separate function (binaryround?)
2. Provide a base argument to around which defaults to 10.
3. Provide a quant(ization) function where the argument is the step-size.
(For completeness, one may think of having multiple quantization modes, not
just rounding)
Any opinions?
BR Oscar Gustafsson