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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nolife at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Mon May 12 03:01:30 2025 UTC