code: def _convert_to_array(array_like, dtype):
          
          if isinstance(array_like, bytes):
              return np.frombuffer(array_like, dtype=dtype)
          return np.asarray(array_like, dtype=dtype)
docs: Convert Matrix attributes which are array-like or buffer to array.