mirror of
https://github.com/triqs/dft_tools
synced 2024-09-08 11:54:45 +02:00
Fix use of numpy.full on older numpy
Was failing test srvo3_transp on centos: File "/home/build/dft_tools/python/sumk_dft_tools.py", line 947, in <dictcomp> for direction in self.directions} AttributeError: 'module' object has no attribute 'full'
This commit is contained in:
parent
64a45510c8
commit
91ce2eef4b
@ -28,6 +28,9 @@ from sumk_dft import SumkDFT
|
|||||||
from scipy.integrate import *
|
from scipy.integrate import *
|
||||||
from scipy.interpolate import *
|
from scipy.interpolate import *
|
||||||
|
|
||||||
|
if not hasattr(numpy, 'full'):
|
||||||
|
# polyfill full for older numpy:
|
||||||
|
numpy.full = lambda a, f: numpy.zeros(a) + f
|
||||||
|
|
||||||
class SumkDFTTools(SumkDFT):
|
class SumkDFTTools(SumkDFT):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user