apple / apple/coremltools

random_categorical returns float when it should return int

Open
#2,337 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
5.4k
Forks
850
Avg merge
4d 5h
Merged PRs (30d)
10

Description

I tried casting the output to int, but that fails

Contributor guide

Open the contributing guide

Research direction

Start by locating the random_categorical entry point in coremltools and reproduce the reported float output, including the failed cast to int. Trace the returned value to identify the relevant implementation and tests; done means the function returns an integer as expected and the casting scenario is covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.