-
Notifications
You must be signed in to change notification settings - Fork 592
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
Standardize imports II, #176 #282
Conversation
ocrolib/edist.py
Outdated
sources[:,:] = None | ||
dists = 99999*ones((m+1,n+1)) | ||
dists[0,:] = arange(n+1) | ||
dists = 99999*np.ones((m+1,n+1)) |
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.
np.full((m + 1, n + 1), 99999)
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.
Thank you!
In lstm.py this form is used:
This patch uses the np namespace. Why the difference? |
This one is a de facto standard; I dunno why |
ea584d0
to
5a71411
Compare
I don't have a problem with using the np namespace, but just wanted to point to the inconsistency. |
Both files are covered good by the current tests and all tests are still fine with these changes. This work is heavily based on the work by @QuLogic in the branch https://github.com/QuLogic/ocropy/commits/standard-import
These replacements are easy.
dfb5a54
to
bfb001d
Compare
Please have a look at the new version of this PR. This should be ready to review now. (There are more files where the imports could be standardized, but maybe we can first make better tests for them. This could be done in some future PRs.) |
CC @Hyper-Node