Re: [Pdl-devel] replace very small numbers

2022-05-06 Thread Ed .
sourceforge.net>; pdl-gene...@lists.sourceforge.net<mailto:pdl-gene...@lists.sourceforge.net> Subject: Re: [Pdl-devel] replace very small numbers Thanks Zaki, Following you, if $a is a ndarray with some very small numbers smaller than $tol, then: my $b=$a->where(abs($a) < $tol

Re: [Pdl-devel] replace very small numbers

2022-05-06 Thread Guillermo P. Ortiz
Thanks Zaki, Following you, if $a is a ndarray with some very small numbers smaller than $tol, then: my $b=$a->where(abs($a) < $tol); $b.=0; the $a has now zero instead of the very small numbers, but is it possible a better solution ? Let me put a clear context for such situations using PDL::LA:

Re: [Pdl-devel] replace very small numbers

2022-05-05 Thread Zakariyya Mughal
On 2022-05-05 at 10:57:53 -0300, Guillermo P. Ortiz wrote: > Hello, > somebody know if there are a quick way > to set all very small number to zero into a ndarray? Hello, If I understand correctly, I believe that you can achieve this using the `where` function

[Pdl-devel] replace very small numbers

2022-05-05 Thread Guillermo P. Ortiz
Hello, somebody know if there are a quick way to set all very small number to zero into a ndarray? Regards -- Dr. Guillermo P. Ortiz Electromagnetismo Aplicado Dto. FĂ­sica, Facultad de Ciencias Exactas Universidad Nacional del Nordeste Avda Libertad 5460, W3404AAS Corrientes, Argentina. (+54)