docs: def write(self, data):
          """Write audio data from a NumPy array to the file.
  
          Writes a number of frames at the read/write position to the
          file. This also advances the read/write position by the same
          number of frames and enlarges the file if necessary.
  
          Note that writing int values to a float file will *not* scale
          the values to [-1.0, 1.0). If you write the value
          ``np.array([42], dtype='int32')``, to a ``subtype='FLOAT'``
          file, the file will then contain ``np.array([42.],
          dtype='float32')``.
  
          Parameters
          ----------
          data : array_like
              The data to write. Usually two-dimensional (frames x
              channels), but one-dimensional `data` can be used for mono
              files. Only the data types ``'float64'``, ``'float32'``,
              ``'int32'`` and ``'int16'`` are supported.
  
              .. note:: The data type of `data` does **not** select the
                    data type of the written file. Audio data will be
                    converted to the given `subtype`. Writing int values
                    to a float file will *not* scale the values to
                    [-1.0, 1.0). If you write the value ``np.array([42],
                    dtype='int32')``, to a ``subtype='FLOAT'`` file, the
                    file will then contain ``np.array([42.],
                    dtype='float32')``.
  
          Examples
          --------
          >>> import numpy as np
          >>> from soundfile import SoundFile
          >>> myfile = SoundFile('stereo_file.wav')
  
          Write 10 frames of random data to a new file:
  
          >>> with SoundFile('stereo_file.wav', 'w', 44100, 2, 'PCM_24') as f:
          >>>     f.write(np.random.randn(10, 2))
  
          See Also
          --------
          buffer_write, .read
  
          """
          import numpy as np
          # no copy is made if data has already the correct memory layout:
          data = np.ascontiguousarray(data)
          written = self._array_io('write', data, len(data))
          assert written == len(data)
          self._update_frames(written)