Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 7f56338

Browse files
author
Matthias Koeppe
committed
PiecewiseFunction: Adjust doctests for changed RealSet repr
1 parent dbdfc06 commit 7f56338

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sage/functions/piecewise.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ def restriction(self, parameters, variable, restricted_domain):
527527
sage: f = piecewise([((-oo, oo), x)]); f
528528
piecewise(x|-->x on (-oo, +oo); x)
529529
sage: f.restriction([[-1,1], [3,3]])
530-
piecewise(x|-->x on [-1, 1] + {3}; x)
530+
piecewise(x|-->x on [-1, 1] {3}; x)
531531
"""
532532
restricted_domain = RealSet(*restricted_domain)
533533
new_param = []
@@ -559,7 +559,7 @@ def extension(self, parameters, variable, extension, extension_domain=None):
559559
ValueError: point 3 is not in the domain
560560
561561
sage: g = f.extension(0); g
562-
piecewise(x|-->x on (-1, 1), x|-->0 on (-oo, -1] + [1, +oo); x)
562+
piecewise(x|-->x on (-1, 1), x|-->0 on (-oo, -1] [1, +oo); x)
563563
sage: g(3)
564564
0
565565
@@ -583,7 +583,7 @@ def unextend_zero(self, parameters, variable):
583583
sage: f = piecewise([((-1,1), x)]); f
584584
piecewise(x|-->x on (-1, 1); x)
585585
sage: g = f.extension(0); g
586-
piecewise(x|-->x on (-1, 1), x|-->0 on (-oo, -1] + [1, +oo); x)
586+
piecewise(x|-->x on (-1, 1), x|-->0 on (-oo, -1] [1, +oo); x)
587587
sage: g(3)
588588
0
589589
sage: h = g.unextend_zero()
@@ -652,7 +652,7 @@ def piecewise_add(self, parameters, variable, other):
652652
sage: f = piecewise([([0,1], 1), ((2,3), x)])
653653
sage: g = piecewise([((1/2, 2), x)])
654654
sage: f.piecewise_add(g).unextend_zero()
655-
piecewise(x|-->1 on (0, 1/2], x|-->x + 1 on (1/2, 1], x|-->x on (1, 2) + (2, 3); x)
655+
piecewise(x|-->1 on (0, 1/2], x|-->x + 1 on (1/2, 1], x|-->x on (1, 2) (2, 3); x)
656656
"""
657657
points = ([minus_infinity] +
658658
sorted(set(self.end_points() + other.end_points())) +

0 commit comments

Comments
 (0)