php.net |  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
 [2017-10-10 03:55 UTC] nolife at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.fann-scale-input
---


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:
---------------
        $values=[1,2,3];
        fann_scale_input($ann, $values);
        var_dump($values);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 00:01:29 2024 UTC