File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,9 @@ template = "{tag}"
4242dev_template = " {tag}"
4343dirty_template = " {tag}"
4444
45+ [tool .setuptools ]
46+ package-dir = {"" = " src" }
47+
4548[tool .setuptools .packages .find ]
4649where = [" src" ] # list of folders that contain the packages (["."] by default)
4750include = [" *" ] # package names should match these glob patterns (["*"] by default)
Original file line number Diff line number Diff line change @@ -73,21 +73,13 @@ def load_image(self, filename):
7373 :param filename: str or Path, image file name or path
7474 :return: 2D ndarray, flipped image array
7575 """
76- filename = Path (
77- filename
78- ).expanduser () # handle "~", make it a Path object
79- if filename .exists ():
80- filenamefull = filename
81- else :
82- found_files = list (Path .home ().rglob (filename .name ))
83- filenamefull = found_files [0 ] if found_files else None
84-
85- if filenamefull is None or not filenamefull .exists ():
76+ filenamefull = Path (filename ).resolve ()
77+
78+ if not filenamefull .exists ():
8679 raise FileNotFoundError (
8780 f"Error: file not found: { filename } , "
8881 f"Please rerun specifying a valid filename."
8982 )
90- return np .zeros ((100 , 100 ))
9183
9284 image = np .zeros ((100 , 100 ))
9385 for _ in range (10 ): # retry 10 times (5 seconds total)
You can’t perform that action at this time.
0 commit comments