mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 09:44:31 +03:00
commit
caf7af6a04
|
@ -178,6 +178,14 @@ class TestNumpy(PillowTestCase):
|
||||||
|
|
||||||
self.assertEqual(len(im.getdata()), len(arr))
|
self.assertEqual(len(im.getdata()), len(arr))
|
||||||
|
|
||||||
|
def test_roundtrip_eye(self):
|
||||||
|
for dtype in (numpy.bool, numpy.bool8,
|
||||||
|
numpy.int8, numpy.int16, numpy.int32,
|
||||||
|
numpy.uint8, numpy.uint16, numpy.uint32,
|
||||||
|
numpy.float, numpy.float32, numpy.float64):
|
||||||
|
arr = numpy.eye(10, dtype=dtype)
|
||||||
|
numpy.testing.assert_array_equal(arr, numpy.array(Image.fromarray(arr)))
|
||||||
|
|
||||||
def test_zero_size(self):
|
def test_zero_size(self):
|
||||||
# Shouldn't cause floating point exception
|
# Shouldn't cause floating point exception
|
||||||
# See https://github.com/python-pillow/Pillow/issues/2259
|
# See https://github.com/python-pillow/Pillow/issues/2259
|
||||||
|
|
|
@ -1280,7 +1280,7 @@ static struct {
|
||||||
{"1", "1;I", 1, unpack1I},
|
{"1", "1;I", 1, unpack1I},
|
||||||
{"1", "1;R", 1, unpack1R},
|
{"1", "1;R", 1, unpack1R},
|
||||||
{"1", "1;IR", 1, unpack1IR},
|
{"1", "1;IR", 1, unpack1IR},
|
||||||
{"1", "1;8", 1, unpack18},
|
{"1", "1;8", 8, unpack18},
|
||||||
|
|
||||||
/* greyscale */
|
/* greyscale */
|
||||||
{"L", "L;2", 2, unpackL2},
|
{"L", "L;2", 2, unpackL2},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user