Skip to content

Commit 2e84ffc

Browse files
author
Kasper Peeters
committed
Document the use of 'Weight.get().value()'.
1 parent 135885d commit 2e84ffc

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

examples/ref_programming.cnb

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,41 @@
668668
],
669669
"source": "p2 = Symmetric.get($A_{m n}$)\np2;"
670670
},
671+
{
672+
"cell_id": 867371738363577328,
673+
"cell_origin": "client",
674+
"cell_type": "latex",
675+
"cells": [
676+
{
677+
"cell_id": 11028315898171412377,
678+
"cell_origin": "client",
679+
"cell_type": "latex_view",
680+
"source": "Some properties, like `Weight` have an associated value. You can access these with the appropriate member function,\nso for this particular example you would do"
681+
}
682+
],
683+
"hidden": true,
684+
"source": "Some properties, like `Weight` have an associated value. You can access these with the appropriate member function,\nso for this particular example you would do"
685+
},
686+
{
687+
"cell_id": 8211547310713253802,
688+
"cell_origin": "client",
689+
"cell_type": "input",
690+
"cells": [
691+
{
692+
"cell_id": 815228937313619719,
693+
"cell_origin": "server",
694+
"cell_type": "latex_view",
695+
"source": "\\begin{dmath*}{}\\text{Property Weight attached to~}x.\\end{dmath*}"
696+
},
697+
{
698+
"cell_id": 9075103878800686191,
699+
"cell_origin": "server",
700+
"cell_type": "verbatim",
701+
"source": "\\begin{verbatim}42\\end{verbatim}"
702+
}
703+
],
704+
"source": "x::Weight(value=42, label=field);\nWeight.get($x$, label=\"field\").value(\"field\");"
705+
},
671706
{
672707
"cell_id": 15480924078324966867,
673708
"cell_origin": "client",

web2/cadabra2/source/changelog.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ <h3>github master (2.4.5)</h3>
2323
<li>Fix <tt>canonicalise</tt> acting on expressions with self-anticommuting objects and derivatives (Daniel).</li>
2424
<li>Fix crash when comparing with empty expressions.</li>
2525
<li>Make <tt>zoom</tt> accept a list of patterns (Daniel).</li>
26+
<li>Fix bugs in getting Weight values from Python, and setting multipliers in Python.</li>
2627
</ul>
2728

2829
<h3>2.4.4 (released 20-Sep-2023)</h3>

0 commit comments

Comments
 (0)