octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Support for N-dimensional arrays almost done


From: Oliver Heimlich
Subject: Re: Support for N-dimensional arrays almost done
Date: Thu, 27 Jul 2017 23:49:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Hi Joel,

On 25.07.2017 10:59, Joel Dahne wrote:
> There is one more test that always fails for me
> 
> doc/chapter/examples.texinfo ........................... FAIL    1/15
> 
>    >> f = @(x) sqrt (x) + (x + 1) .* cos (x);
>     pkg load symbolic
>     df = function_handle (diff (formula (f (sym ("x")))))
> 
>       expected:    df = @(x) -(x + 1) .* sin (x) + cos (x) + 1 ./ (2 .* sqrt 
> (x))
> 
>       got     : df =
> 
> @(x) -(x + 1) .* sin (x) + cos (x) + 1 ./ (2 * sqrt (x))
> 
> It seems like that there is only a problem with the formatting but I
> have not been able to fix it. Does it fail for you to, and if so should
> I add a SKIP for it?

The formatting has changed in the symbolic package since I have written
this example. I am going to fix the formatting of the example to match
the new version.

> Oliver Heimlich writes:
>> Regarding the unit tests: I'll put a little bit more work into the
>> Makefile and add complete support for the new ITF1788 test data during
>> all make targets, e. g., “make run”.  The aim is that we can eventually
>> get rid of the generated test/*.tst files (or
>> build/octave/native/interval/*.tst files in the package development
>> workspace).  For the user it makes package testing more straight forward
>> since you can simply test the function that you want to test and don't
>> have to execute an extra test suite.  If you want, you can spread use of
>> itl.mat among the other methods and add ND array test by reshaping the
>> test data.
> 
> I'm not sure I follow you here. You want to get rid of the test/*.tst
> files, where should the test be stored then? Is the goal to be able to
> use Octaves test-command to perform all tests (thus making it easy to
> test only one function)? ITF1788 will supply the testing data, where
> will we reshape the data, in ITF1788 or in the interval packages Makefile?

I am currently working on this. I hope to finish migration this night.
You can have a peek in [6], I am going to push other functions later.
The test data will be stored in a .mat file. The tests are performed
during “test <functioname>”, which has to load its part of the test data
from the .mat file.

Shaping the test data into the .mat file has already been implemented.
The testcases are stored as cell arrays. It is possible to either
iterate over the cell array (for scalar tests) or cat the cell array
(for vector tests). I have already prepared %!test blocks to do this.

Your job would be to add one or more %!test blocks, which reshape the
data into ND arrays (you may discard some test cases to get correct
dimensions).

[6]
https://sourceforge.net/p/octave/interval/ci/f35e6c4964256c14b87d1aa315dd60a6ad38e52b/tree/inst/@infsup/plus.m#l80


>> Regarding bonus topics that you could follow after having finished the
>> work on ND arrays:
>>
>>  - Improve plotting [4] by adding support for more functions (plotyy,
>> semilogx/y, loglog, and others that make sense) or by adding support for
>> plotting options (line style, marker style, …).
>>
>>  - Implement new interval arithmetic functions (some rough ideas in the
>> wiki [5]).
>>
>>  - Also I like your idea to work on Taylor arithmetic, since it is
>> closely related.
> 
> I have started to work on a package to Taylor arithmetic. At the moment
> I'm using the same repository as during the spring [1]. Most likely I
> will later have some question regarding how to handle a new package in
> Octave but at the moment I'm just trying to get it to work.

Nice, please don't forget to also assign copyright to original authors
at the beginning of files when you copy from existing packages.

> 
> [1]
> https://github.com/Urathai/octave-taylor-POC
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]