class_docstr: Replaces a[:] = b by a call to numpy.copyto.
  
  This is a slight extension to numpy.copyto as it assumes it also supports
  string and list as first argument.
  
  >>> import gast as ast
  >>> from pythran import passmanager, backend
  >>> node = ast.parse('a[:] = b')
  >>> pm = passmanager.PassManager("test")
  >>> _, node = pm.apply(CopyTo, node)
  >>> print(pm.dump(backend.Python, node))
  import numpy as __pythran_import_numpy
  __pythran_import_numpy.copyto(a, b)
  >>> node = ast.parse('a[:] = b[:]')
  >>> pm = passmanager.PassManager("test")
  >>> _, node = pm.apply(CopyTo, node)
  >>> print(pm.dump(backend.Python, node))
  import numpy as __pythran_import_numpy
  __pythran_import_numpy.copyto(a, b)
class_docstr_tok: ["Replaces","a","[",":","]","=","b","by","a","call","to","numpy.copyto",".","This","is","a","slight","extension","to","numpy.copyto","as","it","assumes","it","also","supports","string","and","list","as","first","argument",".",">",">",">","import","gast","as","ast",">",">",">","from","pythran","import","passmanager",",","backend",">",">",">","node","=","ast.parse","(","'","a","[",":","]","=","b","'",")",">",">",">","pm","=","passmanager.PassManager","(","``","test","''",")",">",">",">","_",",","node","=","pm.apply","(","CopyTo",",","node",")",">",">",">","print","(","pm.dump","(","backend.Python",",","node",")",")","import","numpy","as","__pythran_import_numpy","__pythran_import_numpy.copyto","(","a",",","b",")",">",">",">","node","=","ast.parse","(","'","a","[",":","]","=","b","[",":","]","'",")",">",">",">","pm","=","passmanager.PassManager","(","``","test","''",")",">",">",">","_",",","node","=","pm.apply","(","CopyTo",",","node",")",">",">",">","print","(","pm.dump","(","backend.Python",",","node",")",")","import","numpy","as","__pythran_import_numpy","__pythran_import_numpy.copyto","(","a",",","b",")"]
code: def visit_Module(self, node):
      self.generic_visit(node)
      if self.update:
          import_alias = ast.alias(name="numpy", asname=mangle("numpy"))
          importIt = ast.Import(names=[import_alias])
          node.body.insert(0, importIt)
      return node
  
file_path: pythran/pythran/optimizations/copyto.py
imports: from pythran.passmanager import Transformation
  from pythran.analyses.ast_matcher import ASTMatcher, AST_any
  from pythran.conversion import mangle
  from pythran.utils import isnum
  import gast
  import copy
label_desc: Use image node_id 4 for calling the CopyTo obj's underlying member method code with example usage: obj.visit_Module(node) and returns: node