code: def py_to_weld_type(self, obj):
          
          if isinstance(obj, np.ndarray):
              dtype = str(obj.dtype)
              if dtype == 'int16':
                  base = WeldInt16()
              elif dtype == 'int32':
                  base = WeldInt()
              elif dtype == 'int64':
                  base = WeldLong()
              elif dtype == 'float32':
                  base = WeldFloat()
              elif dtype == 'float64':
                  base = WeldDouble()
              elif dtype == 'bool':
                  base = WeldBit()
              else:
                  base = WeldVec(WeldChar())  # TODO: Fix this
              for i in xrange(obj.ndim):
                  base = WeldVec(base)
          elif isinstance(obj, str):
              base = WeldVec(WeldChar())
          else:
              raise Exception("Invalid object type: unable to infer NVL type")
          return base
docs: Summary
  
          Args:
              obj (TYPE): Description
  
          Returns:
              TYPE: Description
  
          Raises:
              Exception: Description