Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: load colormaps from binaries instead of text files #102

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

neutrinoceros
Copy link
Collaborator

@neutrinoceros neutrinoceros commented Dec 18, 2023

Another startup time optimization.

I generated the binary files using the following script

import numpy as np
from pathlib import Path

DIR = Path(__file__).parent / "cmasher" / "colormaps"

for file in DIR.glob("*.txt"):
    rgb = np.genfromtxt(file, dtype=None, comments="//", encoding=None)
    np.save(file.with_suffix(".npy"), rgb, allow_pickle=False)

Copy link

codecov bot commented Dec 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3a4f364) 98.64% compared to head (371a8b7) 98.67%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #102      +/-   ##
==========================================
+ Coverage   98.64%   98.67%   +0.03%     
==========================================
  Files           5        5              
  Lines         587      600      +13     
==========================================
+ Hits          579      592      +13     
  Misses          8        8              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@neutrinoceros neutrinoceros marked this pull request as ready for review December 18, 2023 14:34
@neutrinoceros neutrinoceros merged commit f0872b1 into 1313e:dev Dec 18, 2023
21 checks passed
@neutrinoceros neutrinoceros deleted the load_from_binaries branch December 18, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant