From: Merlijn van Deen (valhallasw) Date: Mon, 26 Sep 2011 08:38:47 +0000 (+0200) Subject: Allow Waves to be directly used as numpy arrays X-Git-Tag: v0.2~24^2~5^2^2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=50fff7bd991ff68caa1072bb1d03d1e5d04c93cf;p=igor.git Allow Waves to be directly used as numpy arrays --- diff --git a/igor.py b/igor.py index e67ed33..9c68111 100644 --- a/igor.py +++ b/igor.py @@ -204,6 +204,9 @@ class Wave(ParseObject): else: type,size = "data", "x".join(str(d) for d in self.data.shape) return " "*indent+"%s %s (%s)"%(self.name, type, size) + + def __array__(self): + return self.data class Recreation(ParseObject): """