Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Update NeuralNet.py #19

Merged
merged 4 commits into from
Nov 30, 2020
Merged

Update NeuralNet.py #19

merged 4 commits into from
Nov 30, 2020

Conversation

manonreau
Copy link
Collaborator

  • fix some export bugs.

@manonreau manonreau requested a review from NicoRenaud November 25, 2020 17:57
Comment on lines 348 to 353
count = 0
hdf5_name = hdf5.split('.')[0]
while os.path.exists(fname) :
count += 1
hdf5 = hdf5.split('.')[0]
hdf5 = '{}_{:03d}.hdf5'.format(hdf5, count)
hdf5 = '{}_{:03d}.hdf5'.format(hdf5_name, count)
fname = os.path.join(self.outdir, hdf5)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could consider putting that in a staticmethod or external function as it appears at several places :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in general code duplication should be avoided as it makes the code difficult to maintain. In this case it's not a big deal of course :)

@manonreau manonreau merged commit b7ce669 into master Nov 30, 2020
@manonreau manonreau deleted the fix-bugs branch December 3, 2020 08:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants