Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add Template class #1982
Add Template class #1982
Changes from 22 commits
513a344
c242446
4ca9ec6
107bdf9
1585f11
078e605
383e7d8
aae0ef4
d2c6ec7
961d269
ad4185e
9ee3a1d
9d7c9ac
e4e5736
6e1027b
cb8107a
d05e67d
cc8a523
13d7e9f
73e9562
52c333b
3368b0a
2fb79cc
437695c
c2727ee
600f20f
8b78386
a1e6eae
3c38d15
aa08f1b
ea2a8a0
afc04da
4f8bd73
e52dd28
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure to be happy with this.
This is computationaly costy. For me the shape is enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok for now. If this becomes problematic later we'll fix it.
NOTE: this assumes that the extra channels are zero-padded!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a boolean to deactivate this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One other comment based on my googling
kw_only
is a 3.10+ ( I think 3.8 and 3.9 are suppose to be supported).https://docs.python.org/3/library/dataclasses.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@h-mayorquin can you remove it then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
This is another shortcoming of only having tests for python 3.10 only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@h-mayorquin in this line, would it make sense to have a
Templates.make_sparse(sparsity)
method which returns aTemplates
object with sparse templates using thesparsity
? (not only the template_array)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like an overkill to me. The only thing that is different is the
template_array
.If you want to make it simply and unintrusive for users we shouid sparsify ourselves at
__init__
instead of throwing an error.If you want to make it simpler but want to let them know we should have a method to sparsify the template array and tell them to use that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it. So the current way to do that would be:
Indeed, looks simple enough :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is now part of the sparsity class.