QuantEcon / lecture-python-intro

An Undergraduate Lecture Series for the Foundations of Computational Economics
https://intro.quantecon.org/
41 stars 21 forks source link

FIX: Update python code to simplify and resolve FutureWarning #540

Closed mmcky closed 4 months ago

mmcky commented 4 months ago

This PR addresses comments from @jstac in #539

Can x = np.asarray(df['income']) be simplified to x = np.array(df['income']) ?

All classes of np.assarray have been removed as they are not required.

The FutureWarnings look a bit ugly -- should we suppress them?

Addressed these using the better accessor iloc[]

netlify[bot] commented 4 months ago

Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
Latest commit eb5c1818e227a861ce1ed98418be30173f4bb208
Latest deploy log https://app.netlify.com/sites/taupe-gaufre-c4e660/deploys/66ab05b821469c000874eb73
Deploy Preview https://deploy-preview-540--taupe-gaufre-c4e660.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

mmcky commented 4 months ago

@jstac this addresses your comments in #539

The asarray is not required at all so I have removed them.

github-actions[bot] commented 4 months ago

🚀 Deployed on https://66ab07a1e7b3586d0c99bdaa--taupe-gaufre-c4e660.netlify.app

mmcky commented 4 months ago

@jstac will address the other inf issue now -- not actually getting them locally which is strange.

mmcky commented 4 months ago

@jstac the latest release of anaconda fixes the issue.

I just reviewed execution and we are getting green ticks across the board so I think we are good to upgrade anaconda in this PR if you agree.