Skip to content

Two bugs noticed...#1036

Merged
rocky merged 3 commits intomasterfrom
two-fixes
Dec 7, 2020
Merged

Two bugs noticed...#1036
rocky merged 3 commits intomasterfrom
two-fixes

Conversation

@rocky
Copy link
Copy Markdown
Member

@rocky rocky commented Dec 7, 2020

setup.py: builtin/image.py directly imports wordcloud but that is not in setup.py
Not sure why this wasn't seen before. Maybe some other package pulls it
it in implicity? However if it is imported here, it should be mentioned
in setup.py

mathics/builtin/image.py: now that from_python distinguishs ints from
bools image data needs to be converted to an "int" not a "bool".

Otherwise, we get:

1867 ( 4): TEST ImageData[Image[{{0, 1}, {1, 0}, {1, 1}}], "Bit"]
Test failed: ImageData in Reference of Built-in Symbols / Image[] and image related functions.
ImageData[Image[{{0, 1}, {1, 0}, {1, 1}}], "Bit"]
Result: {{False, True}, {True, False}, {True, True}}
Wanted: {{0, 1}, {1, 0}, {1, 1}}

@rocky rocky requested review from GarkGarcia and mmatera December 7, 2020 09:53
setup.py: builtin/image.py directly imports wordcloud but that is not in setup.py
Not sure why this wasn't seen before. Maybe some other package pulls it
it in implicity? However if it is imported here, it should be mentioned
in setup.py

mathics/builtin/image.py: now that from_python distinguishs ints from
bools image data needs to be converted to an "int" not a "bool".

Otherwise, we get:

1867 ( 4): TEST ImageData[Image[{{0, 1}, {1, 0}, {1, 1}}], "Bit"]
Test failed: ImageData in Reference of Built-in Symbols / Image[] and image related functions.
ImageData[Image[{{0, 1}, {1, 0}, {1, 1}}], "Bit"]
Result: {{False, True}, {True, False}, {True, True}}
Wanted: {{0, 1}, {1, 0}, {1, 1}}
rocky added 2 commits December 7, 2020 08:06
Previously it was required on OSX only.
Image tests now seem to require it.
@rocky rocky merged commit 7c226f6 into master Dec 7, 2020
@rocky rocky deleted the two-fixes branch December 10, 2020 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant