|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75347 All scaling functions implemented without effect
Submitted: 2017-10-10 03:55 UTC Modified: 2017-10-10 05:00 UTC
From: nolife at gmail dot com Assigned:
Status: Closed Package: fann (PECL)
PHP Version: 5.6.31 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: nolife at gmail dot com
New email:
PHP Version: OS:


 [2017-10-10 03:55 UTC] nolife at gmail dot com
From manual page:

I guess it was implemented without tested, that explains why no scaling PHP example was supplied with fann as well.

The library function fann_scale_input() does MODIFY the content.
Just like all other scaling functions in C, they modify the pointer content.

In PHP this would be a pass-by-reference.
However that's not done, all scaling functions are effectively useless as they scale within the library but do not change the supplied data.

This is probably a bug since the first implementation until today.

Test script:
        fann_scale_input($ann, $values);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-10 05:00 UTC] nolife at gmail dot com
-Status: Open +Status: Closed
 [2017-10-10 05:00 UTC] nolife at gmail dot com
It's just a documentation error.
The return is not bool
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Dec 05 02:01:23 2020 UTC