From 171d33af4dc5cf4933e7cb87212d1e95fbae05e7 Mon Sep 17 00:00:00 2001 From: John S Bogaardt Date: Fri, 14 Feb 2020 14:11:08 -0700 Subject: [PATCH] Update io.py --- chainladder/core/io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chainladder/core/io.py b/chainladder/core/io.py index 0f1c6ae7..b3da9b7e 100644 --- a/chainladder/core/io.py +++ b/chainladder/core/io.py @@ -23,7 +23,7 @@ def to_json(self): def sparse_out(tri): k, v, o, d = tri.shape xp = cp.get_array_module(tri) - if xp == cp: + if xp == cp != np: out = cp.asnumpy(tri) else: out = tri @@ -44,7 +44,7 @@ def sparse_out(tri): 'dtype': str(getattr(self, attribute).dtype), 'array': getattr(self, attribute).tolist()} xp = cp.get_array_module(self.values) - if xp == cp: + if xp == cp != np: out = cp.asnumpy(self.cum_to_incr().values) else: out = self.cum_to_incr().values