Skip to content

Conversation

@mbauman
Copy link
Contributor

@mbauman mbauman commented Jun 5, 2013

Name the "sp3" plot so it may be referenced in the label.
Fix indexing assignment error in showdown_loss() by creating a "close_mask"
intermediate boolean indexing variable.
Fix risk assignment -- values over by less than $250 were not being assigned the risk value. Ensure this happens by assigning loss[ix] = risk last.
Outputs and plots are not changed.

Name the "sp3" plot so it may be referenced in the label.
Fix indexing assignment error in showdown_loss() by creating a "close_mask"
intermediate boolean indexing variable.
Fix risk assignment -- values over by less than $250 were not being assigned the risk value. Ensure this happens by assigning loss[ix] = risk last.
Outputs and plots are not changed.
@CamDavidsonPilon
Copy link
Owner

Excellent changes. Thanks for spotting this bug; I'll pull and update the plots later today. One question, why include the sp3 variable, if it is never used later?

@mbauman
Copy link
Contributor Author

mbauman commented Jun 5, 2013

Hm? sp3 is used in the current master. Lines 215 and 216:

  "sp3 = plt.fill_between(x , 0, norm_pdf( x, 12000, 3000), \n",
  "                color = \"#7A68A6\", lw = 3, alpha = 0.6,\n",
  "                 label = \"Trip price guess\")\n",
  "plt.autoscale( tight=True)\n",
  "p3 = Rectangle((0, 0), 1, 1, fc=sp3.get_facecolor()[0])\n",
  "legend([p3], [sp3.get_label()])"

@CamDavidsonPilon
Copy link
Owner

hmm yes haha. Thanks for pointing that out. Merging!

CamDavidsonPilon added a commit that referenced this pull request Jun 5, 2013
Ch5: Fix python code in Priceline showdown example
@CamDavidsonPilon CamDavidsonPilon merged commit e56c8e6 into CamDavidsonPilon:master Jun 5, 2013
@mbauman mbauman deleted the ch5code branch June 5, 2013 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants