code: def astype(array, y):
    
    if isinstance(y, autograd.core.Node):
      return array.astype(numpy.array(y.value).dtype)
    return array.astype(numpy.array(y).dtype)
docs: A functional form of the `astype` method.
  
    Args:
      array: The array or number to cast.
      y: An array or number, as the input, whose type should be that of array.
  
    Returns:
      An array or number with the same dtype as `y`.