wtte-rnn
wtte-rnn copied to clipboard
AttributeError: module 'numpy' has no attribute 'float128'
Hi, I was trying to run this example to test WTTE. However, the cell "Format tensor for training" won't execute on my machine:
C:\Python36\python-3.6.2.amd64\lib\site-packages\wtte\transforms.py in normalize_padded(padded,
means, stds, only_nonzero, epsilon)
527 else:
528 vals = padded.reshape(n_obs, n_features)
--> 529 means = np.nanmean(vals, axis=0, keepdims=False, dtype=np.float128)
530 del vals
531
AttributeError: module 'numpy' has no attribute 'float128'
I am using WinPython with
- Python 3.6.2
- numpy 1.14.5
- wtte 1.1.1
- tensorflow-gpu 1.9.0
- keras 2.2.0
This issue suggests, that numpy compiled with MKL does not support float128.
The Mailinglist recommends to replace np.float128 with np.longdouble.
I can try to fix this, do you have any PR guidelines?
I fixed it here: https://github.com/taxus13/wtte-rnn/tree/bugfix/float-fix-for-mkl
However, some tests are failing:
- test_discrete_padded_pipeline: different dtypes int64/int32
- test_padded_between (same)
- test_censoring_funs_no_time_discrete (AssertionError: not_censored failed)
- test_censoring_funs_with_time_discrete (same)
Nice catch, did not try with MKL before! None of those test should be affected by your commit so it's a sign that they are failing due to your local environment. What's your pandas version? That could affect 1-2.
Guidelines: Checkout development and submit your PR with changes to that.
I have the most recent pandas 0.23.1
It seems that master is ahead of development and I branched from master. Can you rebase develop on master?
Done! Sorry for slow response, been afk