Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network.activate consistently returns string type output #204

Open
1 task
christianechevarria opened this issue Jan 2, 2020 · 1 comment
Open
1 task
Assignees
Labels
😌 code quality For improvements to the syntax, structure, dependencies, etc... 👀 high priority Prioritized item

Comments

@christianechevarria
Copy link
Member

christianechevarria commented Jan 2, 2020

Description

There seems to be a type coercion bug somewhere in the code that produces the activation values as they are consistently of string type, which could be because some initial construction value is technically a string which coerces all operations. The networks seem to be producing the right values, but this is potentially problematic due to the ambiguity of the "plus" sign in string operations which can produce numbers that seem correct and then are used unassumingly.

To Reproduce

Create a fresh network using the standard constructor, call .activate immediately after, then pass it an array of numbers of equal length to the inputs, when you test the returned array contents individually using typeof you will get string

Tasks

  • Migrate to TypeScript
@christianechevarria christianechevarria added 👀 high priority Prioritized item 😌 code quality For improvements to the syntax, structure, dependencies, etc... labels Jan 2, 2020
@raimannma
Copy link
Member

Fixed in the typescript version

@raimannma raimannma self-assigned this Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😌 code quality For improvements to the syntax, structure, dependencies, etc... 👀 high priority Prioritized item
Projects
None yet
Development

No branches or pull requests

2 participants