Skip to main content
Source Link
greybeard
  • 7.7k
  • 3
  • 21
  • 56

Nit:

In calculate_neuron(), there's a block controlled by if neuron_value == None: (use is/not None (PEP 8)). Fine, but it is followed by an unconditional return <value>:
Use the negated condition for an early out and save one indentation level - "mentally", too.

    if neuron_value is not None:
        return neuron_value

(revised version:
if neuron_value is not None or neuron < self.num_inputs:)

Post Made Community Wiki by greybeard