adareau / HAL

HAL Atom Locator
GNU General Public License v3.0
2 stars 1 forks source link

Alternate version of thomas fermi function #49

Open quentinmarolleau opened 3 years ago

quentinmarolleau commented 3 years ago

Using namedtuple for readability and numpy methods to ensure a well behaved broadcast of arrays.

@QuantumVictor you could try this version, since you apparently had some issues with numpy broadcasting.

Here is a documentation for namedtuple https://realpython.com/python-namedtuple/#creating-tuple-like-classes-with-namedtuple (very useful to keep the functions readable).

EDIT: if it works fine, you can promote it to a genuine Pull-request