Open EiffL opened 3 years ago
Hey @b-remy , since we are going to be writing more code for GalFlow, what do you think of various documentation styles and code formatting? Do you have preferences?
I personally suggest we follow the Google/TensorFlow code styling for python.
Here are some links to the documentation for this:
Agreed, I'll update existing documentation to the TensorFlow code styling!
From https://www.tensorflow.org/community/contribute/code_style:
Operations that take tensors as arguments should call convert_to_tensor to convert non-tensor inputs into tensors if they are using C++ operations. Note that the arguments are still described as a Tensor object of a specific dtype in the documentation.
Should I convert all my non-tensor inputs before applying tensor operations?
Not necessarily... If it's very likely the inputs are scalars you should be fine, but if there is a chance people may send in numpy arrays, you should convert
Same issue as in https://github.com/CosmoStat/autometacal/issues/7
We want to adopt Google/TF conventions