You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh-36067: `sage.{cpython,data_structures,databases,ext,parallel,structure}`: Update `# needs`
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes#12345". -->
- Part of: #29705
- Cherry-picked from: #35095
<!-- If your change requires a documentation PR, please link it
appropriately. -->
### 📝 Checklist
<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->
- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.
### ⌛ Dependencies
<!-- List all open PRs that this PR logically depends on
- #12345: short description why this is a dependency
- #34567: ...
-->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
URL: #36067
Reported by: Matthias Köppe
Reviewer(s): David Coudert
Copy file name to clipboardExpand all lines: src/sage/data_structures/bitset.pyx
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -204,27 +204,28 @@ cdef class FrozenBitset:
204
204
the number of elements currently in the bitset, while the capacity
205
205
is the number of elements that the bitset can hold. ::
206
206
207
-
sage: p = primes_first_n(10); p
207
+
sage: p = primes_first_n(10); p # needs sage.libs.pari
208
208
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
209
-
sage: tuple(p)
209
+
sage: tuple(p) # needs sage.libs.pari
210
210
(2, 3, 5, 7, 11, 13, 17, 19, 23, 29)
211
-
sage: F = FrozenBitset(p); F; FrozenBitset(tuple(p))
211
+
sage: F = FrozenBitset(p); F; FrozenBitset(tuple(p)) # needs sage.libs.pari
212
212
001101010001010001010001000001
213
213
001101010001010001010001000001
214
214
215
215
Recover the primes from the bitset::
216
216
217
-
sage: for b in F:
217
+
sage: for b in F: # needs sage.libs.pari
218
218
....: print(b)
219
219
2
220
220
3
221
221
...
222
222
29
223
-
sage: list(F)
223
+
sage: list(F) # needs sage.libs.pari
224
224
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
225
225
226
226
Query the bitset::
227
227
228
+
sage: # needs sage.libs.pari
228
229
sage: len(F)
229
230
10
230
231
sage: len(list(F))
@@ -2067,7 +2068,7 @@ def test_bitset(py_a, py_b, long n):
2067
2068
2068
2069
Large enough to span multiple limbs. We don't explicitly check the number of limbs below because it will be different in the 32 bit versus 64 bit cases::
a 111001111001111001111001111001111001111001111001111001111001111001111001111001111001111001111001111001111001111001111001111001111001111001111001111001
0 commit comments