Hi, I’m the developer who wrote the forum post you’re referring to. You forgot to include the .np
part, which is the cause of the error.
In future, please link to the forum post you’re following, and enclose code snippets in triple backticks.
I also don’t understand why you’re running a gradient calculation and then an energy calculation.