Skip to content

Commit

Permalink
cope with empty mode at any level, not just root (workaround)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbstrange2 committed Jun 15, 2023
1 parent e40b1ed commit ef9e665
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sam/onyx/generate_matrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ def get_tensor_from_files(name, files_dir, shape, base=10,
positive_only=positive_only)
segs.append(seg_t_)
# Empty matrix...
if mode == 0 and len(seg_t_) == 2 and seg_t_[0] == 0 and seg_t_[1] == 0:
if len(seg_t_) == 2 and seg_t_[0] == 0 and seg_t_[1] == 0:
mg = MatrixGenerator(name=name, shape=shape, sparsity=1.0)
created_empty = True
break
Expand Down

0 comments on commit ef9e665

Please sign in to comment.