GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Test2::Tools::PDL(3) User Contributed Perl Documentation Test2::Tools::PDL(3)

Test2::Tools::PDL - Test2 tools for verifying Perl Data Language piddles

version 0.001

    use Test2::Tools::PDL;
    # Functions are exported by default.
    
    # Ensure something is a piddle.
    pdl_ok($x);
    # Compare two piddles.
    pdl_is($got, $expected, 'Same piddle.');

Checks that the given $thing is a PDL object.

Checks that piddle $got is same as $exp.

Now this method is internally similar as "is($got->unpdl, $exp->unpdl)". It's possible to work with both numeric PDLs as well as non-numeric PDLs (like PDL::Char, PDL::SV).

This module contains tools for verifying PDL piddles.

This module can be configured by some module variables.

These two variables are used when comparing float piddles. For "pdl_is($got, $exp, ...)", the effective tolerance is "$TOLERANCE + abs($TOLERANCE_REL * $exp)".

Default value of $TOLERANCE is same as $Test2::Compare::Float::DEFAULT_TOLERANCE, which is 1e-8. Default value of $TOLERANCE_REL is 0.

For example, to use only relative tolerance,

    {
        local $Test2::Tools::PDL::TOLERANCE = 0;
        local $Test2::Tools::PDL::TOLERANCE_REL = 1e-6;
        ...
    }

PDL, Test2::Suite, Test::PDL

Stephan Loyd <sloyd@cpan.org>

Mohammad S Anwar <manwar@cpan.org>

This software is copyright (c) 2018-2023 by Stephan Loyd.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2023-02-04 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.