NumPower / numpower

PHP extension for efficient scientific computing and array manipulation with GPU support
https://numpower.org
Other
185 stars 4 forks source link

[BUG] Argument #2 ($lam) must be of type float, float given #55

Closed zaunere closed 2 months ago

zaunere commented 2 months ago

Describe the bug Doesn't recognize second parameter as float.

To Reproduce Steps to reproduce the behavior

use \NDArray as nd;
$a = nd::poisson([15,15],1.0);

Uncaught TypeError: NDArray::poisson(): Argument #2 ($lam) must be of type float, float given in

Expected behavior No error and a poisson frame.

Dumps n/a

Environment (please complete the following information):

Optional: PHP Information

PHP 8.2.0 (cli) (built: Jul 25 2023 15:25:01) (NTS DEBUG)
Copyright (c) The PHP Group
Zend Engine v4.2.0, Copyright (c) Zend Technologies

[PHP Modules]
bcmath
Core
ctype
curl
date
dom
fileinfo
filter
gettext
hash
iconv
intl
json
libxml
mbstring
openssl
pcre
Phar
posix
random
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
zip
zlib

[Zend Modules]
SkibidiProduction commented 2 months ago

Fix here #56

henrique-borba commented 2 months ago

Fantastic @SkibidiProduction,

Today I'm going to review the merge requests as soon as I get home.

Thanks for the report @zaunere

henrique-borba commented 2 months ago

Fixed at https://github.com/NumPower/numpower/pull/56, available in the master branch and will be released in version 0.5.2.