New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Theano support numpy 1.12 #5396
Comments
@nouiz I'd like to work on this if no one's assigned |
Maybe someone was working on the first point. So start by the second and third point. thanks. |
I have been working on this as part of the CCW. With numpy version, 1.12.0rc2, I am able to reproduce issue 2. Issue 1 and 4 are not reproducible so far. So, I shall fix the errors for issue 2 for now I guess. |
@chinnadhurai you could send a PR for the second issue alone. We could work on this together if you like :) |
@slefrancois and I fixed issue 2 this morning. @gokul-uf, Would you be interested in working on issue 3? |
I can't reproduce error 1, "float object cannot be interpreted as index". |
@chinnadhurai, yes, any ideas on why we are getting this error? |
invalid strides relate to issue #1586 |
We're going to do a final test by forcing Travis to use numpy 1.12 before closing. |
IMPORTANT NOTE : numpy 1.12.0 requires python version 3.4 or higher (issue #4507) |
I can reproduce point 1 in Theano 0.8 (TypeError: 'float' object cannot be interpreted as an index), in test_bincountFn (theano.tensor.tests.test_extra_ops.TestBinCountOp) for the uint64 type (only), and can fix it with here
I suspect this is because numpy uint64 scalar (i.e. data.max()) + Python int returns numpy float64 (not allowed as an index in numpy 1.12), while for the other integer types it returns the same integer types. I'd expect this to also work in Theano master, but haven't tried this. There's also another test failure with Numpy 1.12, which I have reported separately. |
Another error related to taking ArgMax of a scalar and returning 0 for all scalars: numpy.prod(size=()) produces 1.0, but reshape() would warn silently. From 1.12 onward, it became an error. |
Fixed in #5527. |
See: numpy/numpy#8420 (comment)
Many Theano tests are failing with numpy 1.12 rc.
In summary, there seem to be 4 types of errors:
The text was updated successfully, but these errors were encountered: