kmb266 / cs5150-basketball-project

A basketball stats program created by a CS 5150 team during the Spring 2018 semester
0 stars 0 forks source link

Line 155 #6

Open dbr96 opened 6 years ago

dbr96 commented 6 years ago

https://github.com/kmb266/cs5150-basketball-project/blob/37a68d206d91ba7208e61c851fe2e65c8e60493b/app/advanced_stat.py#L155

Does this set-up of return 0 affect the formula? TmFGM-FGM appears more than once and not just as the denominator.

kmb266 commented 6 years ago

It does affect the formula -- i do not know what PProdAst should be if a player is responsible for all of the team shots -- which is the only time this will evaluate to 0 -- so we just said it should be 0. Do you have a better idea/ know if it should be different?

This really just protects against a division by 0 error. (because it is not possible to divide by 0, python breaks if you try and do it, breaking all of the stats if one of the formulas breaks.

dbr96 commented 6 years ago

This should be fine since there should never be a time that a player takes all the shots.