-
Notifications
You must be signed in to change notification settings - Fork 135
Allow passing static shape to tensor creation helpers #118
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
Conversation
c58aef3
to
9e714a6
Compare
* Also default dtype to "floatX" when using `tensor`
9e714a6
to
c5bfbcd
Compare
4452581
to
58ac86d
Compare
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.
Happy with the changes!
dc340ce
to
18c3cc3
Compare
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.
I found one thing in a test
generally I'm worried that the breaking change to require explicit kwargs will cause a lot of things to break downstream.
Requiring shape
to be an explicit kwarg (but not dtype) should be much smoother, no?
The reason for that was that |
For context, I was going just for the first commit in this PR, which is backwards compatible, and @ferrine asked we made |
ba0278b
to
f6fdfd6
Compare
* Name is now the only optional non-keyword argument for all constructors
f6fdfd6
to
7b621c4
Compare
Yes, I believe uniform API is much better long term, and since we anyway just made the fork, we better make these changes sooner than later |
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.
Okay, I just checked the PyMC codebase and found no places where it would actually break.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #118 +/- ##
==========================================
+ Coverage 74.41% 74.46% +0.04%
==========================================
Files 179 179
Lines 49249 49282 +33
Branches 10422 10432 +10
==========================================
+ Hits 36649 36696 +47
+ Misses 10295 10282 -13
+ Partials 2305 2304 -1
|
Closes #61
Major / Breaking Changes
pytensor.tensor.tensor
now accepts name as the only positional argument. All other arguments must be provided via keywordNew features
pt.matrix(shape=(10, None))
)