From 492c0211608fa756ba6642ff7ae3b479765a955b Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 23 Jun 2020 15:19:06 +0200 Subject: Check numpy array type --- python/astra/data2d.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'python/astra/data2d.py') diff --git a/python/astra/data2d.py b/python/astra/data2d.py index 188ff69..6ab458f 100644 --- a/python/astra/data2d.py +++ b/python/astra/data2d.py @@ -65,12 +65,7 @@ def link(datatype, geometry, data): :returns: :class:`int` -- the ID of the constructed object. """ - if not isinstance(data,np.ndarray): - raise ValueError("Input should be a numpy array") - if not data.dtype==np.float32: - raise ValueError("Numpy array should be float32") - if not (data.flags['C_CONTIGUOUS'] and data.flags['ALIGNED']): - raise ValueError("Numpy array should be C_CONTIGUOUS and ALIGNED") + checkArrayForLink(data) return d.create(datatype,geometry,data,True) def store(i, data): -- cgit v1.2.3