Julian Way of Using Keyword Arguments

A few thoughts

  1. Consider making the arguments positional arguments rather than keyword arguments. You can use a docstring to tell the reader what the arguments mean. This also means you can change the internal API easier.
  2. Re-factor your code so it only takes one input. It’s not obvious why your Q4 function needs two arguments if x is fully determined by j
  3. Use structs. If you find yourself passing a lot of information around which uses the same parameters over and over again, consider putting everything you need for your model in a struct and passing that around instead.
5 Likes