Skip to content
This repository was archived by the owner on May 25, 2024. It is now read-only.
This repository was archived by the owner on May 25, 2024. It is now read-only.

ZeroDivisionError: integer division or modulo by zero #10

Open
@KerenHalperin

Description

@KerenHalperin

Hi,
I'm using XGBClassifier and getting this error:
~/anaconda3/envs/kando/lib/python3.8/site-packages/micromlgen/templates/xgboost/xgboost.jinja in block 'predict'()
4 float votes[{{ n_classes }}] = { 0.0f };
5
----> 6 {% for k, tree in f.enumerate(trees) %}
7 {% with i = 0, class_idx = k % n_classes %}
8 // tree #{{ k + 1 }}

ZeroDivisionError: integer division or modulo by zero
Can you please explain why this is happening?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions