Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

BitGenerator support #499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
flying-sheep wants to merge 47 commits into PyO3:main
base: main
Choose a base branch
Loading
from flying-sheep:pa/bitgen
Open
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
06d6ce1
WIP bitgen
flying-sheep Jun 6, 2025
07e2416
nonnull
flying-sheep Jun 6, 2025
b611943
fix and test
flying-sheep Jun 6, 2025
d93a264
cmt
flying-sheep Jun 6, 2025
f52b2fa
safer: don’t allow trying to get `BitGen` from any PyAny
flying-sheep Jun 7, 2025
05814d6
less indirection
flying-sheep Jun 7, 2025
37d360e
add tryfrom
flying-sheep Jun 7, 2025
eed5b19
implement rand
flying-sheep Jun 7, 2025
6c1a89b
fmt
flying-sheep Jun 7, 2025
d1909d3
rename and deref
flying-sheep Jun 8, 2025
bde2553
order
flying-sheep Jun 8, 2025
a0b9ec5
make into lock
flying-sheep Jun 8, 2025
ee32246
docs
flying-sheep Jun 8, 2025
1be6838
more docs
flying-sheep Jun 8, 2025
2aa3d90
guard
flying-sheep Jun 8, 2025
0258e6d
call_method0
flying-sheep Jun 8, 2025
876001b
reaname test
flying-sheep Jun 8, 2025
71ce8be
manually drop and capsule
flying-sheep Jun 8, 2025
2de7072
remove useless test
flying-sheep Jun 8, 2025
016eb7a
doctests
flying-sheep Jun 8, 2025
1f7f37f
smaller
flying-sheep Jun 8, 2025
1d01c7a
clarify where to release the GIL
flying-sheep Jun 8, 2025
c90176a
safety
flying-sheep Jun 8, 2025
f49d3fa
oops
flying-sheep Jun 8, 2025
a16846d
less unsafe
flying-sheep Jun 8, 2025
573d890
add thread test
flying-sheep Jun 8, 2025
06bb693
back to lock acquiring
flying-sheep Jun 8, 2025
663fa29
docs
flying-sheep Jun 9, 2025
c6105c9
no copy/clone
flying-sheep Jun 10, 2025
3a0aa92
rename to release
flying-sheep Jun 10, 2025
a92861a
remove lifetime
flying-sheep Jun 10, 2025
6dbb6dc
static
flying-sheep Jun 10, 2025
b102d20
no mut ref conversion
flying-sheep Jun 10, 2025
e5e440e
disambiguate
flying-sheep Jun 10, 2025
e73e3a2
rand_core only
flying-sheep Jun 10, 2025
c6493df
rename bitgen type
flying-sheep Jun 10, 2025
2327f36
c_str macro
flying-sheep Jun 10, 2025
e5c6458
intern strings
flying-sheep Jun 10, 2025
e8cd5e8
docs
flying-sheep Jun 10, 2025
0868405
more doc
flying-sheep Jun 10, 2025
8667203
clean up tests
flying-sheep Jun 10, 2025
1fd7bb5
no let-else
flying-sheep Jun 10, 2025
3913171
use GILOnceCell::import
flying-sheep Jun 10, 2025
7bc0be8
add `released` attr
flying-sheep Jun 10, 2025
8caf054
f64
flying-sheep Jun 10, 2025
d8b62ac
correct locking
flying-sheep Jun 15, 2025
43e2d97
test that double locking fails
flying-sheep Jul 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cmt
  • Loading branch information
flying-sheep committed Jun 6, 2025
commit d93a2643481b07c63d996ac68e2340b568f18a21
2 changes: 1 addition & 1 deletion src/npyffi/random.rs
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{ffi::c_void, ptr::NonNull};
use pyo3::{exceptions::PyRuntimeError, prelude::*, types::PyCapsule};

#[repr(C)]
#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone, Copy)] // TODO: can it be Clone and/or Copy?
pub struct npy_bitgen {
pub state: *mut c_void,
pub next_uint64: unsafe extern "C" fn(*mut c_void) -> super::npy_uint64, //nogil
Expand Down

AltStyle によって変換されたページ (->オリジナル) /