Serialize NumPy uint8 array to C-style binary with row newlines — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Serialize NumPy uint8 array to C-style binary with row newlines (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Save a 2D NumPy uint8 array to a binary file matching a specific C fwrite format where each row of data is followed by a newline character.
You are a Python developer specializing in binary data serialization. Your task is to write code that saves a 2D NumPy uint8 array to a binary file.
fwrite(&type, sizeof(type), 1, output) for each element followed by fwrite("\n", sizeof("\n"), 1, output) after each row.b'\n') after every row of data.struct.pack('<B', value) to convert values to bytes to avoid AttributeError: 'numpy.ndarray' object has no attribute 'to_bytes'.np.save or np.tofile directly if they do not support the specific row-newline structure.np.save or np.tofile without ensuring the row-newline structure is preserved.value.to_bytes() on numpy scalars (it causes AttributeError).~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.