MCPcopy
hub / github.com/mne-tools/mne-python / _write

Function _write

mne/_fiff/write.py:27–39  ·  view source on GitHub ↗

Write data.

(fid, data, kind, data_size, FIFFT_TYPE, dtype)

Source from the content-addressed store, hash-verified

25
26
27def _write(fid, data, kind, data_size, FIFFT_TYPE, dtype):
28 """Write data."""
29 if isinstance(data, np.ndarray):
30 data_size *= data.size
31
32 # XXX for string types the data size is used as
33 # computed in ``write_string``.
34
35 fid.write(np.array(kind, dtype=">i4").tobytes())
36 fid.write(np.array(FIFFT_TYPE, dtype=">i4").tobytes())
37 fid.write(np.array(data_size, dtype=">i4").tobytes())
38 fid.write(np.array(FIFF.FIFFV_NEXT_SEQ, dtype=">i4").tobytes())
39 fid.write(np.array(data, dtype=dtype).tobytes())
40
41
42def _get_split_size(split_size):

Callers 8

write_intFunction · 0.85
write_doubleFunction · 0.85
write_floatFunction · 0.85
write_dau_pack16Function · 0.85
write_complex64Function · 0.85
write_complex128Function · 0.85
write_julianFunction · 0.85
write_stringFunction · 0.85

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected