Skip to content

Commit

Permalink
reformat pmcx python units with black
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed May 5, 2023
1 parent 31c0fa3 commit bd44f65
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
10 changes: 5 additions & 5 deletions pmcx/pmcx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
try:
from _pmcx import gpuinfo, run
except ImportError: # pragma: no cover
print('the pmcx binary extension (_pmcx) is not compiled! please compile first')
print("the pmcx binary extension (_pmcx) is not compiled! please compile first")

#from .utils import detweight
#from .files import loadmc2, loadmch, load, save
# from .utils import detweight
# from .files import loadmc2, loadmch, load, save
from .bench import bench

__version__ = '0.0.13'
__version__ = "0.0.13"

__all__ = ('gpuinfo', 'run', 'bench')
__all__ = ("gpuinfo", "run", "bench")
42 changes: 21 additions & 21 deletions pmcx/pmcx/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@
import copy

bench = {}
bench['cube60']={
'nphoton': 1000000,
'vol':np.ones([60,60,60],dtype='uint8'),
'tstart':0,
'tend':5e-9,
'tstep':5e-9,
'srcpos': [29,29,0],
'srcdir':[0,0,1],
'prop':[[0,0,1,1],[0.005,1,0.01,1.37],[0.002,5,0.9,1]],
'isreflect':0,
'seed':1648335518,
'session':'cube60',
'detpos':[[29,19,0,1],[29,39,0,1],[19,29,0,1],[39,29,0,1]],
'issrcfrom0':1
bench["cube60"] = {
"nphoton": 1000000,
"vol": np.ones([60, 60, 60], dtype="uint8"),
"tstart": 0,
"tend": 5e-9,
"tstep": 5e-9,
"srcpos": [29, 29, 0],
"srcdir": [0, 0, 1],
"prop": [[0, 0, 1, 1], [0.005, 1, 0.01, 1.37], [0.002, 5, 0.9, 1]],
"isreflect": 0,
"seed": 1648335518,
"session": "cube60",
"detpos": [[29, 19, 0, 1], [29, 39, 0, 1], [19, 29, 0, 1], [39, 29, 0, 1]],
"issrcfrom0": 1,
}

bench['cube60b']=copy.deepcopy(bench['cube60'])
bench['cube60b']['isreflect']=1
bench["cube60b"] = copy.deepcopy(bench["cube60"])
bench["cube60b"]["isreflect"] = 1

bench['cube60planar']=copy.deepcopy(bench['cube60b'])
bench['cube60planar']['srctype']='planar'
bench['cube60planar']['srcpos']=[10,10,-10]
bench['cube60planar']['srcparam1']=[40,0,0,0]
bench['cube60planar']['srcparam2']=[0,40,0,0]
bench["cube60planar"] = copy.deepcopy(bench["cube60b"])
bench["cube60planar"]["srctype"] = "planar"
bench["cube60planar"]["srcpos"] = [10, 10, -10]
bench["cube60planar"]["srcparam1"] = [40, 0, 0, 0]
bench["cube60planar"]["srcparam2"] = [0, 40, 0, 0]
2 changes: 1 addition & 1 deletion pymcx
2 changes: 1 addition & 1 deletion src/pybind11
Submodule pybind11 updated 79 files
+61 −65 .clang-tidy
+3 −5 .github/CONTRIBUTING.md
+4 −0 .github/dependabot.yml
+23 −40 .github/workflows/ci.yml
+1 −1 .github/workflows/configure.yml
+4 −6 .github/workflows/format.yml
+5 −7 .github/workflows/pip.yml
+3 −3 .github/workflows/upstream.yml
+11 −14 .pre-commit-config.yaml
+0 −13 CMakeLists.txt
+0 −3 docs/_static/css/custom.css
+11 −0 docs/_static/theme_overrides.css
+2 −2 docs/advanced/cast/custom.rst
+3 −3 docs/advanced/cast/stl.rst
+2 −2 docs/advanced/classes.rst
+2 −2 docs/advanced/pycpp/numpy.rst
+1 −1 docs/advanced/smart_ptrs.rst
+12 −160 docs/changelog.rst
+1 −1 docs/classes.rst
+17 −6 docs/conf.py
+ docs/pybind11-logo.png
+3 −4 docs/requirements.txt
+3 −5 include/pybind11/attr.h
+5 −5 include/pybind11/cast.h
+30 −23 include/pybind11/detail/class.h
+2 −21 include/pybind11/detail/common.h
+1 −1 include/pybind11/detail/init.h
+0 −1 include/pybind11/detail/internals.h
+66 −0 include/pybind11/detail/type_caster_base.h
+3 −9 include/pybind11/detail/typeid.h
+6 −17 include/pybind11/eigen.h
+32 −56 include/pybind11/embed.h
+2 −2 include/pybind11/functional.h
+1 −1 include/pybind11/iostream.h
+8 −19 include/pybind11/numpy.h
+26 −44 include/pybind11/pybind11.h
+64 −338 include/pybind11/pytypes.h
+6 −6 include/pybind11/stl.h
+6 −16 noxfile.py
+1 −2 pybind11/__init__.py
+1 −8 pybind11/__main__.py
+1 −1 pybind11/_version.py
+0 −12 pybind11/commands.py
+1 −2 setup.cfg
+0 −1 setup.py
+0 −1 tests/CMakeLists.txt
+1 −14 tests/conftest.py
+0 −51 tests/cross_module_interleaved_error_already_set.cpp
+58 −68 tests/extra_python_package/test_files.py
+0 −25 tests/pybind11_tests.cpp
+1 −1 tests/requirements.txt
+2 −8 tests/test_builtin_casters.cpp
+2 −2 tests/test_constants_and_functions.cpp
+7 −7 tests/test_custom_type_casters.cpp
+2 −5 tests/test_eigen.cpp
+0 −7 tests/test_eigen.py
+1 −1 tests/test_embed/CMakeLists.txt
+2 −47 tests/test_exceptions.cpp
+3 −99 tests/test_exceptions.py
+1 −10 tests/test_kwargs_and_defaults.cpp
+9 −21 tests/test_methods_and_attributes.py
+0 −2 tests/test_modules.cpp
+0 −30 tests/test_modules.py
+1 −1 tests/test_numpy_array.cpp
+1 −1 tests/test_numpy_dtypes.cpp
+1 −1 tests/test_numpy_vectorize.cpp
+0 −183 tests/test_pytypes.cpp
+0 −129 tests/test_pytypes.py
+2 −2 tests/test_smart_ptr.cpp
+8 −15 tests/test_stl.cpp
+2 −2 tests/test_tagbased_polymorphic.cpp
+3 −2 tests/test_virtual_functions.cpp
+11 −21 tools/FindPythonLibsNew.cmake
+0 −23 tools/JoinPaths.cmake
+0 −7 tools/pybind11.pc.in
+1 −3 tools/pybind11NewTools.cmake
+11 −32 tools/pybind11Tools.cmake
+0 −2 tools/setup_global.py.in
+0 −2 tools/setup_main.py.in

0 comments on commit bd44f65

Please sign in to comment.