On Wed, Feb 26, 2020 at 5:30 PM Ilhan Polat <ilhanpo...@gmail.com> wrote:
> Does this mean that np.round(np.float32(5)) return a 64 bit upcasted int? > No. np.round() is an alias (which would be good to deprecate) for np.around(). No one has proposed changing np.around(). > That would be really awkward for many reasons pandas frame size being > bloated just by rounding for an example. Or numpy array size growing for no > apparent reason > > I am not really sure if I understand why LSP should hold in this case to > be honest. Rounding is an operation specific for the number instance and > not for the generic class. > The type of the return value is part of the type's interface, not the specific instance. -- Robert Kern
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion