prefig 0.5.4__py3-none-any.whl → 0.5.6.dev20260128135047__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- prefig/core/axes.py +28 -9
- prefig/core/math_utilities.py +10 -0
- prefig/core/user_namespace.py +1 -0
- {prefig-0.5.4.dist-info → prefig-0.5.6.dev20260128135047.dist-info}/METADATA +1 -1
- {prefig-0.5.4.dist-info → prefig-0.5.6.dev20260128135047.dist-info}/RECORD +8 -8
- {prefig-0.5.4.dist-info → prefig-0.5.6.dev20260128135047.dist-info}/LICENSE +0 -0
- {prefig-0.5.4.dist-info → prefig-0.5.6.dev20260128135047.dist-info}/WHEEL +0 -0
- {prefig-0.5.4.dist-info → prefig-0.5.6.dev20260128135047.dist-info}/entry_points.txt +0 -0
prefig/core/axes.py
CHANGED
|
@@ -114,25 +114,44 @@ def get_pi_text(x):
|
|
|
114
114
|
if abs(4*x - round(4*x)) < 1e-10:
|
|
115
115
|
num = round(4*x)
|
|
116
116
|
if num == -1:
|
|
117
|
-
return r'-\pi
|
|
117
|
+
return r'-\frac{\pi}{4}'
|
|
118
118
|
if num == 1:
|
|
119
|
-
return r'\pi
|
|
119
|
+
return r'\frac{\pi}{4}'
|
|
120
120
|
if num % 2 == 1:
|
|
121
|
-
|
|
121
|
+
if num < 0:
|
|
122
|
+
return f'-\\frac{{{-num}\\pi}}{{4}}'
|
|
123
|
+
else:
|
|
124
|
+
return f'\\frac{{{num}\\pi}}{{4}}'
|
|
122
125
|
if abs(2*x - round(2*x)) < 1e-10:
|
|
123
126
|
num = round(2*x)
|
|
124
127
|
if num == -1:
|
|
125
|
-
return r'-\pi
|
|
128
|
+
return r'-\frac{\pi}{2}'
|
|
126
129
|
if num == 1:
|
|
127
|
-
return r'\pi
|
|
128
|
-
|
|
130
|
+
return r'\frac{\pi}{2}'
|
|
131
|
+
if num < 0:
|
|
132
|
+
return f'-\\frac{{{-num}\\pi}}{{2}}'
|
|
133
|
+
else:
|
|
134
|
+
return f'\\frac{{{num}\\pi}}{{2}}'
|
|
129
135
|
if abs(3*x - round(3*x)) < 1e-10:
|
|
130
136
|
num = round(3*x)
|
|
131
137
|
if num == -1:
|
|
132
|
-
return r'-\pi
|
|
138
|
+
return r'-\frac{\pi}{3}'
|
|
139
|
+
if num == 1:
|
|
140
|
+
return r'\frac{\pi}{3}'
|
|
141
|
+
if num < 0:
|
|
142
|
+
return f'-\\frac{{{-num}\\pi}}{{3}}'
|
|
143
|
+
else:
|
|
144
|
+
return f'\\frac{{{num}\\pi}}{{3}}'
|
|
145
|
+
if abs(6*x - round(6*x)) < 1e-10:
|
|
146
|
+
num = round(6*x)
|
|
147
|
+
if num == -1:
|
|
148
|
+
return r'-\frac{\pi}{6}'
|
|
133
149
|
if num == 1:
|
|
134
|
-
return r'\pi
|
|
135
|
-
|
|
150
|
+
return r'\frac{\pi}{6}'
|
|
151
|
+
if num < 0:
|
|
152
|
+
return f'-\\frac{{{-num}\\pi}}{{6}}'
|
|
153
|
+
else:
|
|
154
|
+
return f'\\frac{{{num}\\pi}}{{6}}'
|
|
136
155
|
return r'{0:g}\pi'.format(x)
|
|
137
156
|
|
|
138
157
|
|
prefig/core/math_utilities.py
CHANGED
|
@@ -18,6 +18,16 @@ def set_diagram(d):
|
|
|
18
18
|
def ln(x):
|
|
19
19
|
return math.log(x)
|
|
20
20
|
|
|
21
|
+
#Add other three trig functions for convenience
|
|
22
|
+
def sec(x):
|
|
23
|
+
return 1/math.cos(x)
|
|
24
|
+
|
|
25
|
+
def csc(x):
|
|
26
|
+
return 1/math.sin(x)
|
|
27
|
+
|
|
28
|
+
def cot(x):
|
|
29
|
+
return 1/math.tan(x)
|
|
30
|
+
|
|
21
31
|
def dot(u, v):
|
|
22
32
|
return np.dot(np.array(u), np.array(v))
|
|
23
33
|
|
prefig/core/user_namespace.py
CHANGED
|
@@ -24,6 +24,7 @@ __delta_on = False
|
|
|
24
24
|
functions = {x for x in dir(math) + dir(math_utilities) if not "__" in x}.difference({'e', 'pi'})
|
|
25
25
|
functions.add('max')
|
|
26
26
|
functions.add('min')
|
|
27
|
+
functions.add('round')
|
|
27
28
|
variables = {'e', 'pi', 'inf'}
|
|
28
29
|
|
|
29
30
|
# Transforms an AST by wrapping any List or Tuple inside a numpy array
|
|
@@ -5,7 +5,7 @@ prefig/core/__init__.py,sha256=roT0a8-iBrp8WXTbPN5RzMWFiCXfpKrEXa2xE-F-yBo,728
|
|
|
5
5
|
prefig/core/annotations.py,sha256=0vNxWkSAIDIs2L6pTJT0vGgL7qn0yBRw0to6kUeWcTw,7869
|
|
6
6
|
prefig/core/area.py,sha256=U-AxXvaZJWgVccpLlh-aaRfM_QtTa09NR2TqAd8Yk0o,3710
|
|
7
7
|
prefig/core/arrow.py,sha256=NJIh6E1W7NDfyw0BK9mhIrdF1s0Z8iKI0Ut8cM0qvDA,11510
|
|
8
|
-
prefig/core/axes.py,sha256=
|
|
8
|
+
prefig/core/axes.py,sha256=gOP77KjCnKNQ3ovdcjnTvmQ9zDClSzgB9zCfKFrgvTQ,32494
|
|
9
9
|
prefig/core/calculus.py,sha256=Q4kSGTTTeQYEEVKgmYWpFP0JLHmCsBchB5OF9qSclQk,498
|
|
10
10
|
prefig/core/circle.py,sha256=zWm0emJ2YzH4EcaOqgxMgg-_t4Qcrd2Itfo6_s_61uo,16054
|
|
11
11
|
prefig/core/clip.py,sha256=G4bg7jTGWCd284yzhCwOBbXdxgKvokYbEr2ITA4febI,808
|
|
@@ -23,7 +23,7 @@ prefig/core/label.py,sha256=iIL0QXyNOGbWSA8xLoPgkkxghTcyHRmdDQw07mvBGjY,25100
|
|
|
23
23
|
prefig/core/label_tools.py,sha256=jOawiyrKC5iQs0vq7133xNXqrkJbMqDZVHflT-hOruo,9167
|
|
24
24
|
prefig/core/legend.py,sha256=S8r0M-nfoQL6tMpeq79xTgDQen9c13NAzMX5au1x47Q,13356
|
|
25
25
|
prefig/core/line.py,sha256=3Q0bIYoKkKlTfdM-wMh9xXSQgEpMAwyWPAmJZgzDFzc,9038
|
|
26
|
-
prefig/core/math_utilities.py,sha256=
|
|
26
|
+
prefig/core/math_utilities.py,sha256=ZRmki4KoyQA8NZ_ofG_RdREPeVR0O-bCNGyS57floSU,6089
|
|
27
27
|
prefig/core/network.py,sha256=BQLK6t65-_w8KcpFEG4OfCCi8zVntOn8nw1bLmPIuIA,27221
|
|
28
28
|
prefig/core/parametric_curve.py,sha256=WIg6BC4AIx6Hs_1Bl18BJYPY7vaCn80qyDn6OixK3Z0,3431
|
|
29
29
|
prefig/core/parse.py,sha256=plLmR0KKrUjYx0PmHHo5HZonaaT3tW4qjiDOtzuhSkQ,4542
|
|
@@ -39,7 +39,7 @@ prefig/core/slope_field.py,sha256=KThnVBuO_3QK7k6xxCWnsbiv-X9P8oS1SgFPLoynA-E,87
|
|
|
39
39
|
prefig/core/statistics.py,sha256=5qN_-ABN0EFVG12ZP95uSPk82INbWRqI3w2fUdR3wsw,3458
|
|
40
40
|
prefig/core/tags.py,sha256=7w6E3960o_ZgZl4xYJLVJ1eLttt0vVlB4IgMZGTMyyE,4134
|
|
41
41
|
prefig/core/tangent_line.py,sha256=I9wf9VAqhnmmsh8Lzynwi7_Z1DonHXqHf8ym7eO40tk,3400
|
|
42
|
-
prefig/core/user_namespace.py,sha256=
|
|
42
|
+
prefig/core/user_namespace.py,sha256=8TG3sN5j2zYoLTK8qNmsUQLETUe0fzoHOpWbofMfkqI,7082
|
|
43
43
|
prefig/core/utilities.py,sha256=ndbB43tDDMj-RFUCCJAFgfdVb1gxYyr9WuHZoHEPC6c,2967
|
|
44
44
|
prefig/core/vector.py,sha256=lTw-y9mt6jqmbFxdPwQB4PYBQ9y4pGrQRcpRp9lBIbY,2917
|
|
45
45
|
prefig/engine.py,sha256=Zz7j2sFxeMwPN1f3GFTpaBihqguzMNJD5iBONOVL7eQ,11972
|
|
@@ -61,8 +61,8 @@ prefig/resources/schema/pf_schema.rng,sha256=6U72-HDhdS9drcKoTBVyBxo1XLXxMnPJvrQ
|
|
|
61
61
|
prefig/resources/template/pf_publication.xml,sha256=eEv8HACv610Apw5DSVNy0reLfELYqHlNy9Oq0GH7C_c,200
|
|
62
62
|
prefig/scripts/__init__.py,sha256=qJcPi1WRh9UAwu4zIFJbmxWalAMilMYqgi6LxRkF7bI,25
|
|
63
63
|
prefig/scripts/install_mj.py,sha256=5A6-oc1xbIXka5mkFE70vlp9-Rh_QoxOxGMrQi9Hkio,1219
|
|
64
|
-
prefig-0.5.
|
|
65
|
-
prefig-0.5.
|
|
66
|
-
prefig-0.5.
|
|
67
|
-
prefig-0.5.
|
|
68
|
-
prefig-0.5.
|
|
64
|
+
prefig-0.5.6.dev20260128135047.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
65
|
+
prefig-0.5.6.dev20260128135047.dist-info/METADATA,sha256=4CsfiYGYsFRdZwfbDNbgQ7F-dSRwoZXHrGsLaDpFwEA,8708
|
|
66
|
+
prefig-0.5.6.dev20260128135047.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
67
|
+
prefig-0.5.6.dev20260128135047.dist-info/entry_points.txt,sha256=OP4ZQT71q2b0Zfbie-oM2Z1HlxpkuX7qaxJnzwsBOVQ,42
|
|
68
|
+
prefig-0.5.6.dev20260128135047.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|