mirror of
https://github.com/triqs/dft_tools
synced 2024-12-24 13:23:37 +01:00
Fix #101 operator: add python wrapper for is_zero
- added is_zero in python - reorder a bit (module defined first), but that is cosmetics
This commit is contained in:
parent
58659415ad
commit
eeba763171
@ -1,5 +1,12 @@
|
||||
from wrap_generator import *
|
||||
|
||||
# The many_body_operators module
|
||||
module = module_(full_name = "pytriqs.operators.operators2", doc = "Doc to be written")
|
||||
module.add_include("<triqs/operators/many_body_operator.hpp>")
|
||||
module.add_include("<triqs/arrays.hpp>")
|
||||
module.add_using("namespace triqs::utility")
|
||||
|
||||
|
||||
# The operator class
|
||||
op = class_(
|
||||
py_type = "Operator",
|
||||
@ -10,12 +17,8 @@ op = class_(
|
||||
)
|
||||
|
||||
op.add_constructor(signature="()", doc="create zero operator")
|
||||
op.add_method("bool is_zero()", doc = "Boolean : is the operator null ?")
|
||||
|
||||
# The many_body_operators module
|
||||
module = module_(full_name = "pytriqs.operators.operators2", doc = "Doc to be written")
|
||||
module.add_include("<triqs/operators/many_body_operator.hpp>")
|
||||
module.add_include("<triqs/arrays.hpp>")
|
||||
module.add_using("namespace triqs::utility")
|
||||
module.add_class(op)
|
||||
|
||||
# Add various overload of c, c_dag to the module Annihilation & Creation operators
|
||||
|
Loading…
Reference in New Issue
Block a user