.. include:: ../substitutions

.. oe:namespace:: OESystem

.. meta::
   :keywords: OEGetBytesFromGrid

.. oe:function:: OEGetBytesFromGrid

   .. oe:language:: c++ java csharp

      .. oe:api::

         OEGetBytesFromGrid(grid: OEScalarGrid, gtype: int) - > bytes
         OEGetBytesFromGrid(grid: OESkewGrid, gtype: int) - > bytes

   .. oe:language:: python

      .. oe:api:: python

         OEGetBytesFromGrid(grid: OEScalarGrid, gType: int) -> bytes
         OEGetBytesFromGrid(grid: OESkewGrid, gType: int) -> bytes


   Converts a grid (:ref:`OEScalarGrid <OESystem_OEScalarGrid>`,
   :ref:`OESkewGrid <OESystem_OESkewGrid>`) with the file
   type, ``gtype`` (:oe:constns:`OESystem::OEGridFileType`), to bytes.

   .. seealso::

      * :oe:func:`OESystem::OEGetGridFileType` function
      * :oe:func:`OESystem::OEGetScalarGridFromBytes` function
      * :oe:func:`OESystem::OEGetSkewGridFromBytes` function