Skip to content

Commit

Permalink
workaround for accessing property using String
Browse files Browse the repository at this point in the history
  • Loading branch information
alexej-jordan committed Sep 17, 2023
1 parent 31bb3d4 commit 24d8d71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PolyhedralGeometry/helpers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ function _detect_default_field(::Type{T}, p::Polymake.BigObject) where T<:FieldE
propnames = intersect(Polymake.list_properties(p), ["INPUT_RAYS", "POINTS", "RAYS", "VERTICES", "VECTORS", "INPUT_LINEALITY", "LINEALITY_SPACE", "FACETS", "INEQUALITIES", "EQUATIONS", "LINEAR_SPAN", "AFFINE_HULL"])
# find first OscarNumber wrapping a FieldElem
for pn in propnames
prop = getproperty(p, pn)
prop = getproperty(p, convert(String, pn))
for el in prop
on = Polymake.unwrap(el)
if on isa T
Expand All @@ -501,7 +501,7 @@ function _detect_wrapped_type_and_field(p::Polymake.BigObject)
propnames = intersect(Polymake.list_properties(p), ["INPUT_RAYS", "POINTS", "RAYS", "VERTICES", "VECTORS", "INPUT_LINEALITY", "LINEALITY_SPACE", "FACETS", "INEQUALITIES", "EQUATIONS", "LINEAR_SPAN", "AFFINE_HULL"])
# find first OscarNumber wrapping a FieldElem
for pn in propnames
prop = getproperty(p, pn)
prop = getproperty(p, convert(String, pn))
for el in prop
on = Polymake.unwrap(el)
if on isa FieldElem
Expand Down

0 comments on commit 24d8d71

Please sign in to comment.