First item of periodictable.elements generator is "n"?
Wondering if this is a bug or intentional. Neutrons aren't necessarily elements.
version: 1.6.0
To reproduce:
import periodictable as pt
[e for e in pt.elements][0]
Yes, intentional.
I probably added it because the neutron scattering tables I am using have an entry for the cross section of a bare neutron. I can't imagine anyone is using it for anything, but no guarantees.
Here's a work-around:
for el in list(pt.elements)[1:]:
... # process el
With a small tweak to pt.core.PeriodicTable.__getitem__, we could support:
for el in pt.elements[1:]:
... # process el
My inclination is to leave it in place.
A number of files need to be updated should we decide to remove it:
pt.core.element_basept.mass.init()pt.density.element_densitiespt.crystal_structure.crystal_structurespt.nsf.nsftable
The scattering cross sections and half life should be made available somewhere, such as pt.constants.
It may also show up in docs and tests.
Changing this would be backwards incompatible. Save it for a breaking release.