79690886

Date: 2025-07-05 08:19:28
Score: 1
Natty:
Report link

Thanks for all answers, but I decided to use `from numpy.lib.recfunctions import structured_to_unstructured as str2unstr` since it might be a more direct and clear way of getting the same result.

pos = str2unstr(atoms [["x", "y", "z"]], dtype=np.float64, copy=False)
pos = transform.apply(pos)  # atoms[["x", "y", "z"]] @ transform.T
atoms ["x"] = pos[:, 0]
atoms ["y"] = pos[:, 1]
atoms ["z"] = pos[:, 2]
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Abel GutiƩrrez