Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata lost in nested elementwise operations #50

Open
vsaase opened this issue Sep 9, 2019 · 0 comments
Open

Metadata lost in nested elementwise operations #50

vsaase opened this issue Sep 9, 2019 · 0 comments

Comments

@vsaase
Copy link

vsaase commented Sep 9, 2019

Hi,
check this out:

using ImageMetadata
a = ImageMeta(ones(10,10))
a["asdf"] = 1
b = ImageMeta(ones(10,10))
(a.+b)["asdf"] == 1 #true
(log.(a))["asdf"] == 1 #true
(log.(a.+b))["asdf"] == 1 #KeyError: key "asdf" not found
(b.+a)["asdf"] == 1 #KeyError: key "asdf" not found

Metadata should not be lost without a warning
Also I think a big point in using ImageMetadata is that metadata is kept around as much as possible, so shouldn't it somehow be more intuitive than just keeping the metadata of the first ImageMeta in the expression?

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

No branches or pull requests

1 participant