From 4af02f779ea4309f94d763560f522d2f8a794c32 Mon Sep 17 00:00:00 2001 From: Matthew Newville Date: Sun, 6 Nov 2022 14:59:08 -0600 Subject: [PATCH] speed up test for index_tricks symbols from numpy --- asteval/asteval.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asteval/asteval.py b/asteval/asteval.py index df51f46..43bba29 100644 --- a/asteval/asteval.py +++ b/asteval/asteval.py @@ -186,7 +186,7 @@ def __init__(self, symtable=None, usersyms=None, writer=None, self.no_deepcopy = [key for key, val in symtable.items() if (callable(val) or inspect.ismodule(val) - or 'numpy.lib.index_tricks' in repr(val))] + or 'numpy.lib.index_tricks' in repr(type(val)))] def remove_nodehandler(self, node): """remove support for a node