Skip to content

Commit

Permalink
Comment on NumPy allocation pathway
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Feb 23, 2022
1 parent 45e0d03 commit 9f12b23
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions distributed/comm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

# Find the function, `host_array()`, to use when allocating new host arrays
try:
# Use NumPy, when available, to avoid memory initialization cost
import numpy

host_array = lambda n: memoryview(numpy.empty((n,), dtype="u1")) # type: ignore
Expand Down

0 comments on commit 9f12b23

Please sign in to comment.