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

Get rid of most intX usages #7330

Merged
merged 3 commits into from
May 23, 2024
Merged

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented May 22, 2024

Description

Removed all but one uses of intX, which we started to do in #7114
There is a tricky use in convert_observed_data that I will defer until a later PR, as it has more implications than the removals we did.

Also got rid of floatX_array which was just used in tests.

Related Issue

  • Closes #
  • Related to #

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

📚 Documentation preview 📚: https://pymc--7330.org.readthedocs.build/en/7330/

@ricardoV94 ricardoV94 changed the title Get rid of intX usages Get rid of most intX usages May 22, 2024
@ricardoV94 ricardoV94 requested a review from aseyboldt May 22, 2024 16:25
Copy link
Contributor

@lucianopaz lucianopaz left a comment

Choose a reason for hiding this comment

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

LGTM. My only question is what will as_tensor_variable(..., dtype=int) default to on the pytensor side. int is pure python - arbitrary precision integer, it's not numpy int32 or numpy int64. Once we have that out of the way, I think you're good to merge.

@@ -929,7 +929,7 @@ class Wishart(Continuous):

@classmethod
def dist(cls, nu, V, *args, **kwargs):
nu = pt.as_tensor_variable(intX(nu))
nu = pt.as_tensor_variable(nu, dtype=int)
Copy link
Contributor

Choose a reason for hiding this comment

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

What will this default to on the pytensor side?

Copy link
Member Author

Choose a reason for hiding this comment

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

The same that numpy does, i.e., int64.

@ricardoV94 ricardoV94 merged commit 7836447 into pymc-devs:main May 23, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants