From 50fff7bd991ff68caa1072bb1d03d1e5d04c93cf Mon Sep 17 00:00:00 2001 From: "Merlijn van Deen (valhallasw)" Date: Mon, 26 Sep 2011 10:38:47 +0200 Subject: [PATCH] Allow Waves to be directly used as numpy arrays --- igor.py | 3 +++ 1 file changed, 3 insertions(+) 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): """ -- 2.26.2