From 91ce2eef4bd41b28889fa2ec4dc8f3e47eca1ed1 Mon Sep 17 00:00:00 2001 From: Dylan Simon Date: Tue, 13 Feb 2018 15:42:09 -0500 Subject: [PATCH] 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 for direction in self.directions} AttributeError: 'module' object has no attribute 'full' --- python/sumk_dft_tools.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/sumk_dft_tools.py b/python/sumk_dft_tools.py index 46ead06c..98d1af7a 100644 --- a/python/sumk_dft_tools.py +++ b/python/sumk_dft_tools.py @@ -28,6 +28,9 @@ from sumk_dft import SumkDFT from scipy.integrate 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): """