Skip to content

Commit

Permalink
feature: simple memory optimization with a numpy parameter (ResidentM…
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnessantos committed Nov 23, 2020
1 parent 1d8c590 commit a0de212
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion missingno/missingno.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def matrix(df,

# z is the color-mask array, g is a NxNx3 matrix. Apply the z color-mask to set the RGB of each pixel.
z = df.notnull().values
g = np.zeros((height, width, 3))
g = np.zeros((height, width, 3), dtype=np.float32)

g[z < 0.5] = [1, 1, 1]
g[z > 0.5] = color
Expand Down

0 comments on commit a0de212

Please sign in to comment.