Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add ruff unsafe fixes
  • Loading branch information
t-sommer committed Jun 3, 2025
commit 5d299e76903f06a098df9a237a016dee458b3f31
6 changes: 4 additions & 2 deletions src/sdf/dsres.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import scipy.io

# extract strings from the matrix
strMatNormal = lambda a: [''.join(s).rstrip() for s in a]
strMatTrans = lambda a: [''.join(s).rstrip() for s in zip(*a)]
def strMatNormal(a):
return [''.join(s).rstrip() for s in a]
def strMatTrans(a):
return [''.join(s).rstrip() for s in zip(*a)]


def _split_description(comment):
Expand Down
4 changes: 1 addition & 3 deletions src/sdf/plot/contour_plot_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ def create_plot(filename, datasets):
figure = plt.figure(figsize=(12, 8))
figure.patch.set_facecolor('white')

nrows = len(datasets)

for row, dataset in enumerate(datasets):

# load the datasets
Expand Down Expand Up @@ -78,7 +76,7 @@ def create_plot(filename, datasets):
ax.set_title(scale3.display_name + "=" + ("%g" % scale3.data[i]) + " " + scale3.unit)
ax.set_xlabel(C1.scales[1].display_name + " / " + C1.scales[1].unit)

cbar = figure.colorbar(CSF)
figure.colorbar(CSF)

plt.tight_layout()

Expand Down
2 changes: 1 addition & 1 deletion tests/test_sdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def test_hierarchy(self):
sdf.save('roundtrip.sdf', g)

# load the group from the file
g2 = sdf.load('roundtrip.sdf', '/')
sdf.load('roundtrip.sdf', '/')

# TODO: compare the objects
#self.assertEqual(pickle.dumps(g), pickle.dumps(g2))
Expand Down