How to use the asteval.astutils.HAS_NUMPY function in asteval

To help you get started, we’ve selected a few asteval examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github newville / asteval / asteval / View on Github external
self.err_writer = err_writer or stderr

        if symtable is None:
            if usersyms is None:
                usersyms = {}
            symtable = make_symbol_table(use_numpy=use_numpy, **usersyms)

        self.symtable = symtable
        self._interrupt = None
        self.error = []
        self.error_msg = None
        self.expr = None
        self.retval = None
        self.lineno = 0
        self.start_time = time.time()
        self.use_numpy = HAS_NUMPY and use_numpy

        symtable['print'] = self._printer
        self.no_print = no_print or minimal

        nodes = ALL_NODES[:]

        if minimal or no_if:
        if minimal or no_for:
        if minimal or no_while:
        if minimal or no_try:
        if minimal or no_functiondef: