As discussed in #148, I have added added the necessary components for biggus to mimic Python 2 when performing division operations.
I have redefined __div__ so that it takes into account the dtype of arguments to 'properly' evaluate when using Python 2.
Note: when using Python 3, or __future__ division, nothing will change as Python 3 only uses __floordiv__ and __truediv__
I wasn't sure about where to put a test checking that / evaluates to __div__ as the unit tests for biggus.Array use __future__ division. To test this would then require a new unit test file I think?
I have added a test to check that operator.div evaluates properly which might be all that is needed?
As discussed in #148, I have added added the necessary components for biggus to mimic Python 2 when performing division operations.
I have redefined
__div__
so that it takes into account the dtype of arguments to 'properly' evaluate when using Python 2.Note: when using Python 3, or
__future__
division, nothing will change as Python 3 only uses__floordiv__
and__truediv__
I wasn't sure about where to put a test checking that
/
evaluates to__div__
as the unit tests forbiggus.Array
use__future__
division. To test this would then require a new unit test file I think?I have added a test to check that
operator.div
evaluates properly which might be all that is needed?Any thoughts would be much appreciated!