ocropus-archive / DUP-ocropy

Python-based tools for document analysis and OCR
Apache License 2.0
3.41k stars 590 forks source link

Standardize imports II, #176 #282

Closed zuphilip closed 6 years ago

zuphilip commented 6 years ago

CC @Hyper-Node

amitdo commented 6 years ago

In lstm.py this form is used:

from numpy import (...)

This patch uses the np namespace.

Why the difference?

QuLogic commented 6 years ago

This one is a de facto standard; I dunno why lstm was changed the other way.

zuphilip commented 6 years ago

Agree on what @QuLogic says, see also #206.

amitdo commented 6 years ago

I don't have a problem with using the np namespace, but just wanted to point to the inconsistency.

zuphilip commented 6 years ago

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.)

kba commented 6 years ago

numpy should be np in https://github.com/tmbdev/ocropy/pull/282/commits/23ebc40b0d1ba0dafcea29069b1a231d8df742eb @zuphilip