-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Please report problems when you find them. notes and changes ----------------- Protocol Buffer is currently not supported by nanobind. Adding GridBase.__array__() for NumPy interoperability in many cases works as seemless replacement of the Protocol Buffer. Implicit list->ndarray conversion is also not supported, but is welcomed: wjakob/nanobind#327 None is not accepted by default, an annotation must be added. I may have missed it in some functions - let me know. In case of const char* arg, None is not supported at all; I proposed it upstream: wjakob/nanobind#683 For default nullptr, using nb::arg()=nb::none() instead of =nullptr. Both work, but the latter seems to be more canonical in nanobind. In nanobind 2.x using make_iterator and bind_vector+__getitem__ returns copies, not references, by default. We usually prefer to avoid copying. Added a helper function usual_iterator() that uses old rv_policy. gemmi.ValueSigmaAsuData.value_array: previously had so-called structured data type, now it has shape (N,2) with dtype=float32. Added pickling support for Structure, Model, Chain, Residue, Atom, UnitCell. Notes about pickling of SpaceGroup: wjakob/nanobind#670 In a follow up, picking of SpaceGroup was optimized, replacing xhm() with an index. The gain was modest (pickling and unpickling a list of all SpaceGroups from the built-in table was reduced from ~1ms, to ~0.5ms). It might not be safe - multiple copies of the table may exist. Notes about constructors for PdbWriteOptions and MmcifOutputGroups: see wjakob/nanobind#664 doctests: many changes, mostly because __repr__ of enums and of bind_vector-ed classes in nanobind is different than in pybind11 added alignas(8) to HklValue: in nanobind array bindings, stride is given as a number of elements, not bytes. This was a problem for ComplexAsuData.value_array: sizeof(HklValue) was 20 (3*4+2*4) which is not a multiple of 8. Functions IT92Coef.calculate_sf() and IT92Coef.calculate_density_iso() used to be vectorized (could take numpy array as arg), now they aren't, let me know if you need a vectorized version. Not yet done: *.pyi files with type annotations Planned: unified logging of warnings/errors from various gemmi functions
- Loading branch information
Showing
52 changed files
with
5,768 additions
and
2,391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.