Skip to content

Commit 1625226

Browse files
Issue 498 Fix (#575)
1 parent 663e973 commit 1625226

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ To release a new version, please update the changelog as followed:
8181
### Removed
8282

8383
### Fixed
84+
- Issue #498 - Deprecation Warning Fix in `tl.files` with truth value of an empty array is ambiguous (by @DEKHTIARJonathan in #575)
8485

8586
### Security
8687

tensorlayer/files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,9 +1447,9 @@ def save_joints():
14471447
joint_pos[int(_j_id)] = [float(_x), float(_y)]
14481448
# joint_pos = fix_wrong_joints(joint_pos)
14491449

1450-
# visiblity list
1450+
# visibility list
14511451
if 'is_visible' in str(annopoint.dtype):
1452-
vis = [v[0] if v else [0] for v in annopoint['is_visible'][0]]
1452+
vis = [v[0] if v.size > 0 else [0] for v in annopoint['is_visible'][0]]
14531453
vis = dict([(k, int(v[0])) if len(v) > 0 else v for k, v in zip(j_id, vis)])
14541454
else:
14551455
vis = None

0 commit comments

Comments
 (0)