A robot log comparison tool can report two Python memoryviews as equal even when the stored bytes differ. That result can be correct for a comparison of interpreted values and unsuitable for a check that promises an unchanged binary record. Before treating equality as a duplicate-packet decision, declare which relationship the report is supposed to establish.
An original local fixture makes the distinction visible with three invented diagnostic values: 17, 42, and 255. It compares an unsigned-integer array with a double-precision floating array, then repeats the question with positive and negative zero. These are software experiments, not captured robot traffic or measurements of a production decoder.
Choose the comparison contract first
Python's memoryview equality contract considers shape and corresponding interpreted values for supported formats. Different format codes do not automatically make the views unequal. Unsupported format strings have additional restrictions, so this article stays with the simple I and d formats used by the fixture. The official reference documents that boundary: https://docs.python.org/3.14/library/stdtypes.html#memoryview.__eq__.
The array module supplies the two typed exporters. Its documentation identifies I as unsigned int and d as double, explains that actual storage depends on the machine, and describes tobytes as returning the machine-value representation. It does not make these native arrays into a portable robot packet format. Source: https://docs.python.org/3.14/library/array.html.
Inspect the two inputs separately
The first construction is array('I', [17, 42, 255]). The second is array('d', [17.0, 42.0, 255.0]). Create a memoryview of each array without casting either view or asking for a different shape. Both views report shape (3,), so each comparison position has one corresponding value on the other side.
In the executed Python 3.14.7 environment, the integer view reported itemsize 4 and nbytes 12. The floating view reported itemsize 8 and nbytes 24. Those widths are observations from this machine. Record them with the runtime and byte order when reproducing the experiment; the I code alone is not a universal four-byte wire declaration.
The interpreted lists were [17, 42, 255] and [17.0, 42.0, 255.0]. These small integers have matching floating values in this fixture. Comparing the two views with == returned True. The comparison did not require their format strings, item widths, or total byte counts to match.
Ask a separate question about bytes
Calling tobytes on each view produced byte strings of lengths 12 and 24. Comparing those byte strings returned False. Their lengths already rule out exact byte-string equality in this run; inspecting hexadecimal representations provides a diagnostic record, not an alternative explanation that the values changed.
Consequently, the two observations belong together: memoryview equality was True, and byte-string equality was False. Neither result invalidates the other. One check addressed corresponding interpreted values with compatible shapes; the other addressed the sequence of bytes returned by the view. A report that labels both checks simply unchanged hides the difference its reader needs.
Add controls before blaming the decoder
A separate unsigned-integer array containing the same three values supplied a positive control. Its view compared equal to the first integer view, and the two tobytes results were also equal. The control demonstrates that the fixture can observe agreement at both levels without making object identity part of the requirement.
A second floating array changed only the middle diagnostic value, using [17.0, 43.0, 255.0]. Its view compared unequal to the original integer view. That check helps distinguish interpreted-value equality from an accidental rule that every three-element buffer is equal. The first fixture's True result depended on the values, not just the shared shape.
Check a case where format and size agree
The second main experiment constructed two one-element double arrays, one containing 0.0 and the other -0.0. Both views had format d, shape (1,), itemsize 8, and nbytes 8 in the local run. Their views compared equal, while their byte strings differed. The recorded hexadecimal outputs preserved the representation difference.
This case matters because adding a format-code and byte-count check would reject the first integer-versus-double pair but would not, by itself, establish exact byte identity for the zero pair. The fixture does not claim every floating representation on every Python platform behaves identically. It records an observed example in which equal numeric values, identical format metadata, and equal lengths still did not mean identical bytes.
Name the outcome your report can support
A decoded-value comparison can deliberately accept the first pair when the application contract permits those numeric representations to express the same diagnostic values. That decision needs an explicit type policy; this example does not grant permission to ignore a device protocol's required type, units, precision, or encoding. Numeric agreement cannot establish those other requirements.
An exact-byte comparison should compare stable bytes for the precise region the receipt covers. Comparing the tobytes outputs answered that narrower question for these contiguous, one-dimensional local arrays. It did not compare headers, timestamps, checksums, or any surrounding transport envelope. Adding fields to the comparison later changes what the receipt means and should be recorded as a contract change.
Keep native storage out of protocol claims
The examples deliberately retain native array storage so that the difference between a value and its representation remains visible. They do not define an interchange encoding. A real binary log needs its own documented layout; saving a native array's bytes without such a contract is outside what these experiments validate.
Record the view format, shape, itemsize, nbytes, interpreted values, and the exact byte-comparison result beside the chosen report label. That record explains why values match and bytes differ can both be true. It also gives a reviewer evidence to decide whether the selected comparison answers the actual log-audit question.
Sources were checked November 21, 2026; the linked documentation was labeled Python 3.14.10, separately from the local Python 3.14.7 fixture. All arrays and values above are original local examples. The dedicated AI-generated concept illustration depicts the first fixture's equal values and different storage lengths; it is not a robot packet capture.