mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-19 22:39:09 +00:00
Add blacken-docs and pycln pre-commit hooks (#3292)
* Apply blacken-docs and fix language-hints * Add blacken-docs pre-commit hook * Add pycln pre-commit hook * Enable a few builtin hooks * Black no longer ignores pyi files
This commit is contained in:
@@ -258,8 +258,8 @@ by the compiler. The result is returned as a NumPy array of type
|
||||
|
||||
.. code-block:: pycon
|
||||
|
||||
>>> x = np.array([[1, 3],[5, 7]])
|
||||
>>> y = np.array([[2, 4],[6, 8]])
|
||||
>>> x = np.array([[1, 3], [5, 7]])
|
||||
>>> y = np.array([[2, 4], [6, 8]])
|
||||
>>> z = 3
|
||||
>>> result = vectorized_func(x, y, z)
|
||||
|
||||
@@ -403,7 +403,7 @@ In Python 2, the syntactic sugar ``...`` is not available, but the singleton
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
a = # a NumPy array
|
||||
a = ... # a NumPy array
|
||||
b = a[0, ..., 0]
|
||||
|
||||
The function ``py::ellipsis()`` function can be used to perform the same
|
||||
|
||||
Reference in New Issue
Block a user