Changed max to argmax by Chipe1 · Pull Request #455 · aimacode/aima-python · GitHub
Skip to content

Changed max to argmax#455

Closed
Chipe1 wants to merge 2 commits into
aimacode:masterfrom
Chipe1:texterr
Closed

Changed max to argmax#455
Chipe1 wants to merge 2 commits into
aimacode:masterfrom
Chipe1:texterr

Conversation

@Chipe1

@Chipe1 Chipe1 commented Mar 31, 2017

Copy link
Copy Markdown
Contributor

Changed max() to argmax() to make code easier to read.

Comment thread text.py

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, but I wonder which is clearer:
lambda c: self.decoder.P1[c]
or
self.decoder.P1.get

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean self.decoder.P1.getitem
I got an error when I tried self.decoder.P1.get AttributeError: 'UnigramTextModel' object has no attribute 'get'

@norvig

norvig commented Apr 6, 2017

Copy link
Copy Markdown
Collaborator

Sorry, I was late at getting to this, and now there is a conflict; can you fix?

@Chipe1 Chipe1 closed this Apr 7, 2017
@Chipe1 Chipe1 deleted the texterr branch April 7, 2017 04:08
@Chipe1

Chipe1 commented Apr 7, 2017

Copy link
Copy Markdown
Contributor Author

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