Multipatch: validate fine block before modulo, raw-core GPU checks, README usage
FixedPatchSet2D.fine_layout rejects non-positive, float, bool or wrong-length block sizes with ValueError before any modulo (was ZeroDivisionError/TypeError). The face gap-4 GPU test now checks raw owner cores directly by kind/covered for every patch (ACTIVE finite, OUTER/holes/covered NaN; INNER not asserted), not only the masked download and reversed-order parity. README documents the body-free multipatch call, scope and level-wide fine shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0397b6ebb7
commit
6301887093
4 files changed
+47
-5
No files matched your search
@@ -228,6 +228,9 @@ class FixedPatchSetTests(unittest.TestCase):
|
||||
self.assertTrue(layout.owned.ravel()[s.ghost_fine.astype(np.intp)].all())
|
||||
with self.assertRaisesRegex(ValueError, "aligned"):
|
||||
self.build(self.FACE).fine_layout((5, 4))
|
||||
for block in ((0, 4), (4, 0), (-4, 4), (4.0, 4), (True, 4), (4,), (4, 4, 4), (np.bool_(1), 4)):
|
||||
with self.subTest(block=block), self.assertRaisesRegex(ValueError, "positive integers"):
|
||||
self.build(self.FACE).fine_layout(block)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in new issue
Block a user