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

Cannot use in ifelse #36

Open
david-cortes opened this issue Dec 28, 2020 · 1 comment
Open

Cannot use in ifelse #36

david-cortes opened this issue Dec 28, 2020 · 1 comment

Comments

@david-cortes
Copy link
Contributor

For some reason, it's not possible to use float32 vectors in an ifelse construct. The following line will get stuck without doing anything:

ifelse(TRUE, float::fl(1), 1)
@wrathematics
Copy link
Owner

Thanks for reporting this. The issue appears to be here

ans[ypos] <- rep(yes, length.out = len)[ypos]

I tried setting a replace method for x="ANY" and value="float32", but it doesn't get called for some reason. Not quite sure why.

dselivanov added a commit to dselivanov/rsparse that referenced this issue Dec 29, 2020
dselivanov added a commit to dselivanov/rsparse that referenced this issue Dec 29, 2020
* initial work on biases for model with implicit feedback

* more work on implicit with biases - now rhs takes into account unobserved interactions.

* use precomputed XtX in transform

* fix bug in transform when modelling with biases

* patches wrathematics/float#36

* add tests for models with biases
* fixed bug in transform when using dynamic lambda
* added extra transform() call in fit_transform() to ensure results from transform() and fit_transform() are identical
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

2 participants