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

use integer division to prevent floating point matrix size #15

Merged
merged 1 commit into from
Jun 25, 2018

Conversation

ninjrok
Copy link

@ninjrok ninjrok commented Jun 25, 2018

A type error is thrown when using '/' to calculate matrix sizes. Explicitly using the integer division operator ('//') seems to fix it. Very weird since N is being declared as an integer in the step before it.

Traceback (most recent call last): File "/home/ninja/Documents/github/dlwithtf/ch3/logistic_regression_tf.py", line 13, in <module> mean=np.array((-1, -1)), cov=.1*np.eye(2), size=(N/2,)) File "mtrand.pyx", line 4508, in mtrand.RandomState.multivariate_normal File "mtrand.pyx", line 1550, in mtrand.RandomState.standard_normal File "mtrand.pyx", line 167, in mtrand.cont0_array TypeError: 'float' object cannot be interpreted as an integer

@rbharath
Copy link
Collaborator

@ninjrok Thanks for the bug fix. This looks good on my end so going to merge in.

LGTM

@rbharath rbharath merged commit d116f93 into matroid:master Jun 25, 2018
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