<div dir="ltr"><div><div><div><div><div>Hi All, <br><br></div>Just wondering why the snippet of code below fails:<br><br>ds = yt.load("......./galaxy0030/galaxy0030")<br><br>dd = ds.all_data()<br>grad_fields = ds.add_gradient_fields(("gas","gravitational_potential"))<br>#for i in sorted(ds.derived_field_list):<br>#    print(i)<br>print dd["gravitational_potential_gradient_x"]<br><br><br></div>I see the gradient field (4 in total) have been added to the field list but I can't access the field. <br><br></div>Error:<br>TypeError: only length-1 arrays can be converted to Python scalars<br><br></div>Cheers,<br></div>John<br></div>