Skip to content

Commit 8ec1fb0

Browse files
committed
Remove line numbers, cleanup
1 parent 5299de3 commit 8ec1fb0

File tree

19 files changed

+1037
-1046
lines changed

19 files changed

+1037
-1046
lines changed

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616
- [TinyGrad](https://github.com/tinygrad/tinygrad): 🫀 [Lovely
1717
Grad](https://github.com/xl0/lovely-grad)
1818

19-
##### Proompting
20-
21-
- Log prompts with 💌 [Lovely
22-
Prompts](https://github.com/xl0/lovely-prompts)
23-
- Better LangChain: 😎 [Proompter](https://github.com/xl0/proompter)
24-
2519
##### Community
2620

2721
- [Discord](https://discord.gg/qBaqauUWXP)

index_files/figure-commonmark/cell-17-output-1.svg

Lines changed: 123 additions & 123 deletions
Loading

index_files/figure-commonmark/cell-18-output-1.svg

Lines changed: 120 additions & 120 deletions
Loading

index_files/figure-commonmark/cell-19-output-1.svg

Lines changed: 119 additions & 119 deletions
Loading

index_files/figure-commonmark/cell-28-output-1.svg

Lines changed: 127 additions & 127 deletions
Loading
1 Byte
Loading
-69 Bytes
Loading

lovely_numpy/lo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# %% auto 0
44
__all__ = ['Lo', 'lo']
55

6-
# %% ../nbs/10_lo.ipynb 4
6+
# %% ../nbs/10_lo.ipynb
77
from typing import Any, Union, Optional as O
88
from matplotlib import pyplot as plt, axes, figure
99

@@ -18,7 +18,7 @@
1818
from .repr_rgb import RGBProxy
1919
from .repr_chans import ChanProxy
2020

21-
# %% ../nbs/10_lo.ipynb 5
21+
# %% ../nbs/10_lo.ipynb
2222
class Lo():
2323
"""Lo and behold! What a lovely `numpy.ndarray`!"""
2424
def __init__( self,
@@ -74,7 +74,7 @@ def plt(self):
7474
def __call__(self, depth=1):
7575
return Lo(self.x, depth=depth, color=self.color)
7676

77-
# %% ../nbs/10_lo.ipynb 6
77+
# %% ../nbs/10_lo.ipynb
7878
def lo(x: Union[np.ndarray, np.generic], # Your data
7979
plain :bool =False, # Show as plain text - values only
8080
verbose :bool =None, # Verbose - show values too

lovely_numpy/repr_chans.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# %% auto 0
44
__all__ = ['chans']
55

6-
# %% ../nbs/05_repr_chans.ipynb 3
6+
# %% ../nbs/05_repr_chans.ipynb
77
from typing import Any, Optional as O
88

99
import numpy as np
@@ -15,7 +15,7 @@
1515
from .utils.config import config, get_config
1616
from .utils.utils import cached_property
1717

18-
# %% ../nbs/05_repr_chans.ipynb 4
18+
# %% ../nbs/05_repr_chans.ipynb
1919
def fig_chans( x :np.ndarray, # Input array
2020
cmap :str="twilight", # Use matplotlib colormap by this name
2121
cm_below :str="blue",
@@ -50,7 +50,7 @@ def fig_chans( x :np.ndarray, # Input array
5050
return fig_rgb(inf_cmap(x), cl=True, gutter_px=gutter_px, frame_px=frame_px, scale=scale, view_width=view_width, ax=ax)
5151

5252

53-
# %% ../nbs/05_repr_chans.ipynb 5
53+
# %% ../nbs/05_repr_chans.ipynb
5454
class ChanProxy():
5555
def __init__(self, x: np.ndarray):
5656
self.x = x
@@ -96,7 +96,7 @@ def _repr_png_(self):
9696
metadata={"Software": "Matplotlib, https://matplotlib.org/"})
9797

9898

99-
# %% ../nbs/05_repr_chans.ipynb 6
99+
# %% ../nbs/05_repr_chans.ipynb
100100
def chans( x :np.ndarray, # Input array
101101
cmap :str="twilight", # Use matplotlib colormap by this name
102102
cm_below :str="blue",

lovely_numpy/repr_plt.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# %% auto 0
44
__all__ = ['plot']
55

6-
# %% ../nbs/02_repr_plt.ipynb 3
6+
# %% ../nbs/02_repr_plt.ipynb
77
import math
88
from typing import Union, Tuple, Any, Optional as O
99

@@ -15,7 +15,7 @@
1515
from .utils import get_config, config
1616
from .utils.utils import cached_property
1717

18-
# %% ../nbs/02_repr_plt.ipynb 4
18+
# %% ../nbs/02_repr_plt.ipynb
1919
def normal_pdf( x :np.ndarray,
2020
mean:Union[np.ndarray, float] =0.,
2121
std :Union[np.ndarray, float] =1.):
@@ -34,7 +34,7 @@ def normal_pdf( x :np.ndarray,
3434
(std * np.sqrt((np.pi * 2)))
3535
)
3636

37-
# %% ../nbs/02_repr_plt.ipynb 6
37+
# %% ../nbs/02_repr_plt.ipynb
3838
def sample( x :np.ndarray,
3939
max_s :int,
4040
plt0 :bool):
@@ -60,7 +60,7 @@ def sample( x :np.ndarray,
6060

6161
return (x, x_min, x_max)
6262

63-
# %% ../nbs/02_repr_plt.ipynb 7
63+
# %% ../nbs/02_repr_plt.ipynb
6464
def find_xlims( x_min :Union[float, None],
6565
x_max :Union[float, None],
6666
x_mean :Union[float, None],
@@ -97,7 +97,7 @@ def find_xlims( x_min :Union[float, None],
9797

9898
return (xlim_min, xlim_max)
9999

100-
# %% ../nbs/02_repr_plt.ipynb 8
100+
# %% ../nbs/02_repr_plt.ipynb
101101
def plot_histogram( x :np.ndarray,
102102
ax :axes.Axes):
103103
if x.size:
@@ -115,7 +115,7 @@ def plot_histogram( x :np.ndarray,
115115

116116
ax.hist(x, bins=bins, color="deepskyblue", align="mid", density=True, zorder=4)
117117

118-
# %% ../nbs/02_repr_plt.ipynb 9
118+
# %% ../nbs/02_repr_plt.ipynb
119119
def plot_pdf( x_mean :Union[float, None],
120120
x_std :Union[float, None],
121121
ax :axes.Axes):
@@ -129,7 +129,7 @@ def plot_pdf( x_mean :Union[float, None],
129129
ax.plot(xl, normal_pdf(xl, mean=x_mean, std=x_std), zorder=5)
130130

131131

132-
# %% ../nbs/02_repr_plt.ipynb 10
132+
# %% ../nbs/02_repr_plt.ipynb
133133
def plot_sigmas(x_min :Union[float, None],
134134
x_max :Union[float, None],
135135
x_mean :Union[float, None],
@@ -152,7 +152,7 @@ def plot_sigmas(x_min :Union[float, None],
152152
ax.text(x_pos, ylims[1]*0.95, greek, ha="center", va="top", bbox=bbox, zorder=5, weight=weight)
153153

154154

155-
# %% ../nbs/02_repr_plt.ipynb 11
155+
# %% ../nbs/02_repr_plt.ipynb
156156
def plot_minmax(x_min :Union[float, None],
157157
x_max :Union[float, None],
158158
ax :axes.Axes):
@@ -185,13 +185,13 @@ def plot_minmax(x_min :Union[float, None],
185185
ax.axvline(x_max, 0, 1, c="red", zorder=2)
186186

187187

188-
# %% ../nbs/02_repr_plt.ipynb 12
188+
# %% ../nbs/02_repr_plt.ipynb
189189
def plot_str(t_str, ax):
190190
xlim = ax.get_xlim()
191191
ylim = ax.get_ylim()
192192
ax.text(xlim[0], ylim[1]*1.05, s=t_str)
193193

194-
# %% ../nbs/02_repr_plt.ipynb 13
194+
# %% ../nbs/02_repr_plt.ipynb
195195
@config(show_mem_above=np.inf)
196196
def fig_plot( x :np.ndarray, #
197197
center :str ="zero", # Center plot on `zero`, `mean`, or `range`
@@ -248,7 +248,7 @@ def fig_plot( x :np.ndarray, #
248248
return ax.figure
249249

250250

251-
# %% ../nbs/02_repr_plt.ipynb 14
251+
# %% ../nbs/02_repr_plt.ipynb
252252
# This is here for the monkey-patched tensor use case.
253253
# Gives the ability to call both .plt and .plt(ax=ax).
254254

@@ -295,7 +295,7 @@ def _repr_svg_(self):
295295
svg_repr = print_figure(self.fig, fmt="svg", metadata=metadata)
296296
return svg_repr
297297

298-
# %% ../nbs/02_repr_plt.ipynb 15
298+
# %% ../nbs/02_repr_plt.ipynb
299299
def plot( x :np.ndarray, # Your data
300300
center :str ="zero", # Center plot on `zero`, `mean`, or `range`
301301
max_s :int =10000, # Draw up to this many samples. =0 to draw all

0 commit comments

Comments
 (0)