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

Update fuzzy_overlay.py #258

Merged
merged 1 commit into from
Dec 20, 2023
Merged

Conversation

RichardScottOZ
Copy link
Contributor

minor edits

@nmaarnio
Copy link
Collaborator

Hey, thanks for spotting these 👍 I'll go ahead and merge

@nmaarnio nmaarnio merged commit dfef8d2 into GispoCoding:master Dec 20, 2023
4 checks passed
@RichardScottOZ RichardScottOZ deleted the patch-1 branch March 22, 2024 02:53
Copy link
Contributor Author

@RichardScottOZ RichardScottOZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, why the change from

sum = sum_overlay(data=data)
product = product_overlay(data=data)
return product ** (1 - gamma) * sum**gamma

to

product = np.prod(data, axis=0)
sum = data.sum(axis=0) - product
return product ** (1 - gamma) * sum**gamma

@nmaarnio
Copy link
Collaborator

nmaarnio commented Apr 9, 2024

Ok, why the change from

sum = sum_overlay(data=data)
product = product_overlay(data=data)
return product ** (1 - gamma) * sum**gamma

to

product = np.prod(data, axis=0)
sum = data.sum(axis=0) - product
return product ** (1 - gamma) * sum**gamma

I don't recall exactly, but now that I quickly checked the code, probably just so that _prepare_data_for_fuzzy_overlay wouldn't be run 3 times. Not a necessary change, but then again the functions are simple enough at the moment to be maintainable like this.

@RichardScottOZ
Copy link
Contributor Author

Right, that makes sense!

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.

2 participants