Skip to content

Commit

Permalink
Merge pull request #151 from realratchet/master
Browse files Browse the repository at this point in the history
My bad
  • Loading branch information
realratchet authored Mar 18, 2024
2 parents 3272c37 + ab8ed8c commit 42fae2c
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions nimlite/numpy.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1306,16 +1306,15 @@ iterator iterateFloatPage*(page: BaseNDArray): float =
else: raise newException(ValueError, "invalid page type: " & $page.kind)

iterator iterateBooleanPage*(page: BaseNDArray): bool =
yield true
# case page.kind:
# of K_BOOLEAN:
# for v in BooleanNDArray(page).pgIter:
# yield v
# of K_OBJECT:
# page.validatePageKind(K_BOOLEAN)
# for v in ObjectNDArray(page).pgIter:
# yield PY_Boolean(v).value
# else: raise newException(ValueError, "invalid page type: " & $page.kind)
case page.kind:
of K_BOOLEAN:
for v in BooleanNDArray(page).pgIter:
yield v
of K_OBJECT:
page.validatePageKind(K_BOOLEAN)
for v in ObjectNDArray(page).pgIter:
yield PY_Boolean(v).value
else: raise newException(ValueError, "invalid page type: " & $page.kind)


iterator iterateStringPage*(page: BaseNDArray): string =
Expand Down

0 comments on commit 42fae2c

Please sign in to comment.