6441aa3d9929de1fdce6384d997d17900f03ec2f,mathics/builtin/image.py,ImageCreate,apply,#ImageCreate#Any#Any#,945

Before Change


        if len(shape) == 2 or (len(shape) == 3 and shape[2] in (1, 3)):
            return Image(pixels.clip(0, 1), "RGB" if is_rgb else "Grayscale")
        else:
            return Expression("Image", array)


class ImageBox(BoxConstruct):
    def boxes_to_text(self, leaves, **options):

After Change


            is_rgb = (len(shape) == 3 and shape[2] == 3)
            return Image(pixels.clip(0, 1), "RGB" if is_rgb else "Grayscale")
        else:
            return Symbol("$Aborted")


class ImageBox(BoxConstruct):
    def boxes_to_text(self, leaves, **options):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: mathics/Mathics
Commit Name: 6441aa3d9929de1fdce6384d997d17900f03ec2f
Time: 2016-08-16
Author: Bernhard.Liebl@gmx.org
File Name: mathics/builtin/image.py
Class Name: ImageCreate
Method Name: apply


Project Name: mathics/Mathics
Commit Name: a309401f936ed001df4f2268da985bbc4d9cd8ab
Time: 2021-02-06
Author: matera@fisica.unlp.edu.ar
File Name: mathics/builtin/assignment.py
Class Name: Information
Method Name: format_definition_input


Project Name: mathics/Mathics
Commit Name: fc38b5945fd8d3344f2b076e9635fc6f8471fe77
Time: 2016-08-23
Author: Bernhard.Liebl@gmx.org
File Name: mathics/builtin/manipulate.py
Class Name: Manipulate
Method Name: apply


Project Name: mathics/Mathics
Commit Name: 7a629259a1c42ee25eae800f1968418b05d503ba
Time: 2016-08-16
Author: Bernhard.Liebl@gmx.org
File Name: mathics/builtin/image.py
Class Name: ImageAtom
Method Name: make_boxes