class_docstr: Functor for translating Relay programs into Python ASTs.
class_docstr_tok: ["Functor","for","translating","Relay","programs","into","Python","ASTs","."]
docstr: Given a Numpy array, produces an appropriate Python array
  or numerical literal representing its contents.
docstr_tok: ["Given","a","Numpy","array",",","produces","an","appropriate","Python","array","or","numerical","literal","representing","its","contents","."]
code: def parse_numpy_array(self, arr):
      """Given a Numpy array, produces an appropriate Python array
      or numerical literal representing its contents."""
  
      def parse_single(i):
          return NameConstant(i) if isinstance(i, bool) else Num(i)
  
      if arr.ndim == 0:
          return parse_single(arr.item())
      if arr.ndim == 1:
          return ast.List([parse_single(i.item()) for i in arr], Load())
  
      elts = []
      for row in arr:
          elts.append(self.parse_numpy_array(row))
      return ast.List(elts, Load())
  
imports: import sys
  import ast
  from ast import alias, Assign, Load, Name, NameConstant, Num, Return, Store, Str
  import re
  import tvm
  from tvm import relay
  from tvm.relay.adt import Pattern
  from tvm.relay.backend import te_compiler
  from tvm.relay.expr import Expr, GlobalVar, Var
  from tvm.relay.function import Function
  from tvm.relay.expr_functor import ExprFunctor
label_desc: Use image node_id 10 for calling the PythonConverter obj's underlying member method code with example usage: obj.parse_numpy_array(arr) and returns: ast, unknown, parse_single, ast