baudren / montepython_public

Public repository for the Monte Python Code
MIT License
65 stars 115 forks source link

numpy 1.12 type error #84

Open carlosggarcia opened 7 years ago

carlosggarcia commented 7 years ago

When MontePython computes the histograms, it crashes with the following type error for numpy 1.12.1 (I think that it will happen with any version of 1.12):

TypeError: 'float' object cannot be interpreted as an index

The problem is that np.max does not longer accept floats for the axis argument.

Here is the patch I've proposed to montepython_zuma https://github.com/ardok-m/montepython_zuma/commit/a69f5bc94cdb237c57ef4789b76b6f375368e40f :

0001-fixed-TypeError-np.max-for-numpy-1.12.patch.txt

mahtaparsa commented 7 years ago

Dear ardok-m, try installing numpy 1.11.0 . (may be helpful) $ sudo pip install -U numpy==1.11.0