MCPcopy Create free account
hub / github.com/numpy/numpy / first_write

Method first_write

numpy/lib/npyio.py:1542–1549  ·  view source on GitHub ↗
(self, v)

Source from the content-addressed store, hash-verified

1540 self.fh.write(asunicode(v))
1541
1542 def first_write(self, v):
1543 try:
1544 self.write_normal(v)
1545 self.write = self.write_normal
1546 except TypeError:
1547 # input is probably a bytestream
1548 self.write_bytes(v)
1549 self.write = self.write_bytes
1550
1551 own_fh = False
1552 if isinstance(fname, os_PathLike):

Callers

nothing calls this directly

Calls 2

write_normalMethod · 0.95
write_bytesMethod · 0.95

Tested by

no test coverage detected