From e13bd00a0ed16fcdeefcff713614e956c6d211c1 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Wed, 6 Oct 2021 13:07:57 -0300 Subject: [PATCH] PYTHON: Replace numpy.empty with numpy.zeros in AmunXML.__fill_chunks(). Signed-off-by: Grzegorz Kowal --- python/amunpy/src/amunpy/amunxml.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/amunpy/src/amunpy/amunxml.py b/python/amunpy/src/amunpy/amunxml.py index afffd49..b5d896f 100644 --- a/python/amunpy/src/amunpy/amunxml.py +++ b/python/amunpy/src/amunpy/amunxml.py @@ -168,9 +168,9 @@ class AmunXML(Amun): self.chunks[n]['bounds'] = numpy.array([bounds[:,:,ii[p]].T for p in range(self.chunks[n]['dblocks'])]).T else: - self.chunks[n]['levels'] = numpy.empty((1), dtype = numpy.int32) - self.chunks[n]['coords'] = numpy.empty((3,1), dtype = numpy.int32) - self.chunks[n]['bounds'] = numpy.empty((2,3,1), dtype = numpy.float64) + self.chunks[n]['levels'] = numpy.zeros((1), dtype = numpy.int32) + self.chunks[n]['coords'] = numpy.zeros((3,1), dtype = numpy.int32) + self.chunks[n]['bounds'] = numpy.zeros((2,3,1), dtype = numpy.float64) def __read_binary_data__(self, dataset_name, chunk_number):