Skip to content

Commit

Permalink
Merge pull request #70 from glotzerlab/fix/newest-numpy
Browse files Browse the repository at this point in the history
Fix Type Identifiers
  • Loading branch information
tommy-waltmann authored Jul 5, 2023
2 parents afd4316 + 1b06cfb commit ea53058
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions examples/Calculating Strain via Voxelization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@
"\n",
" match = re.match('^Lattice=\".*\"', header)\n",
" boxstring = match.group(0)\n",
" boxes.append(np.array(str.split(boxstring[9:-1]), dtype=np.float).reshape((3, 3)).T)\n",
" boxes.append(\n",
" np.array(str.split(boxstring[9:-1]), dtype=np.float32).reshape((3, 3)).T\n",
" )\n",
" ff.close()\n",
"\n",
"# find the average box\n",
Expand Down Expand Up @@ -226,7 +228,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -240,7 +242,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.10.10"
},
"widgets": {
"state": {
Expand Down
6 changes: 3 additions & 3 deletions examples/Visualizing 3D Voronoi and Voxelization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
"outputs": [],
"source": [
"aq = freud.AABBQuery(box, positions)\n",
"voxel_neighbors = -np.ones(len(cubic_grid), dtype=np.int)\n",
"voxel_neighbors = -np.ones(len(cubic_grid), dtype=np.int32)\n",
"for i, j, distance in aq.query(cubic_grid, {\"num_neighbors\": 1}):\n",
" voxel_neighbors[i] = j"
]
Expand Down Expand Up @@ -246,7 +246,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -260,7 +260,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.10.10"
}
},
"nbformat": 4,
Expand Down

0 comments on commit ea53058

Please sign in to comment.