class_docstr: A transformer object to transform coordinates from one CRS to another.
  
  Notes
  -----
  Currently only the EPSG authority is supported.
  Currently only projection from WGS84 to UTM (and vice versa)
  is supported.
  
  Examples
  --------
  >>> from cuproj import Transformer
  >>> transformer = Transformer.from_crs("epsg:4326", "epsg:32631")
  >>> transformer.transform(2, 49)
  (500000.0, 5460836.5)
  >>> transformer.transform(500000, 5460836.5, direction="INVERSE")
  (2.0, 49.0)
class_docstr_tok: ["A","transformer","object","to","transform","coordinates","from","one","CRS","to","another",".","Notes","--","--","-","Currently","only","the","EPSG","authority","is","supported",".","Currently","only","projection","from","WGS84","to","UTM","(","and","vice","versa",")","is","supported",".","Examples","--","--","--","--",">",">",">","from","cuproj","import","Transformer",">",">",">","transformer","=","Transformer.from_crs","(","``","epsg:4326","''",",","``","epsg:32631","''",")",">",">",">","transformer.transform","(","2",",","49",")","(","500000.0",",","5460836.5",")",">",">",">","transformer.transform","(","500000",",","5460836.5",",","direction=","''","INVERSE","''",")","(","2.0",",","49.0",")"]
docstr: Transform coordinates from one CRS to another.
  
  If the input data is already in device memory, and the input implements
  `__cuda_array_interface__
  <https://numba.readthedocs.io/en/stable/cuda/cuda_array_interface.html>`_
  , the data will be used directly. If the data is in host memory, it
  will be copied to the device.
  
  Parameters
  ----------
  x : float or array_like
      The x coordinate(s) to transform.
  y : float or array_like
      The y coordinate(s) to transform.
  direction : str, optional
      The direction of the transformation. Either "FORWARD" or "INVERSE".
      Default is "FORWARD".
  
  Returns
  -------
  tuple
      A tuple of transformed x and y coordinates as cupy (device) arrays.
docstr_tok: ["Transform","coordinates","from","one","CRS","to","another",".","If","the","input","data","is","already","in","device","memory",",","and","the","input","implements","`","__cuda_array_interface__","<","https",":","\/\/numba.readthedocs.io\/en\/stable\/cuda\/cuda_array_interface.html",">","`","_",",","the","data","will","be","used","directly",".","If","the","data","is","in","host","memory",",","it","will","be","copied","to","the","device",".","Parameters","--","--","--","--","--","x",":","float","or","array_like","The","x","coordinate","(","s",")","to","transform",".","y",":","float","or","array_like","The","y","coordinate","(","s",")","to","transform",".","direction",":","str",",","optional","The","direction","of","the","transformation",".","Either","``","FORWARD","''","or","``","INVERSE","''",".","Default","is","``","FORWARD","''",".","Returns","--","--","--","-","tuple","A","tuple","of","transformed","x","and","y","coordinates","as","cupy","(","device",")","arrays","."]
code: def transform(self, x, y, direction="FORWARD"):
      """Transform coordinates from one CRS to another.
  
      If the input data is already in device memory, and the input implements
      `__cuda_array_interface__
      <https://numba.readthedocs.io/en/stable/cuda/cuda_array_interface.html>`_
      , the data will be used directly. If the data is in host memory, it
      will be copied to the device.
  
      Parameters
      ----------
      x : float or array_like
          The x coordinate(s) to transform.
      y : float or array_like
          The y coordinate(s) to transform.
      direction : str, optional
          The direction of the transformation. Either "FORWARD" or "INVERSE".
          Default is "FORWARD".
  
      Returns
      -------
      tuple
          A tuple of transformed x and y coordinates as cupy (device) arrays.
      """
  
      if direction not in ("FORWARD", "INVERSE"):
          raise ValueError(f"Invalid direction: {direction}")
  
      isfloat = False
      if isinstance(x, float) and isinstance(y, float):
          isfloat = True
          x = cp.asarray([x], dtype="f8")
          y = cp.asarray([y], dtype="f8")
      else:
          x = cp.asarray(x, x.dtype)
          y = cp.asarray(y, y.dtype)
  
      resx, resy = self._proj.transform(x, y, direction)
  
      if isfloat:
          resx, resy = resx.get()[0], resy.get()[0]
      return resx, resy
  
imports: import cupy
  from cuproj._lib.transform import Transformer
label_desc: Use image node_id 3 for calling the Transformer obj's underlying member method code with example usage: obj.transform(x, y, direction) and returns: resx,  resy