zeros, ones, eye with integer type args...

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

zeros, ones, eye with integer type args...

David Bateman-3
Here is a patch to allow ones, zeros and eye to return integer types
without first creating the floating point matrix. That is

ones (2,"int8")

for example. Also "repmat" was broken with integer types due to its
use of kron, which doesn't handle integer types. This patch removes
this limitation. But doesn't fix kron to allow integer types. The
function "kron" probably should also be adapted.

Regards
David

--
David Bateman                                [hidden email]
Motorola CRM                                 +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin    +33 1 69 35 77 01 (Fax)
91193 Gif-Sur-Yvette FRANCE

The information contained in this communication has been classified as:

[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary

changelog-ones20040830 (574 bytes) Download Attachment
patch.ones20040830 (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

zeros, ones, eye with integer type args...

John W. Eaton-6
On 30-Aug-2004, David Bateman <[hidden email]> wrote:

| ! error ("%s: Unrecognized or illegal classname", fcn);

Please use "invalid" rather than "illegal", since I believe that no
laws would be broken if someone passed some other name to this
function.  :-)

Thanks,

jwe


Reply | Threaded
Open this post in threaded view
|

Re: zeros, ones, eye with integer type args...

David Bateman-3
According to John W. Eaton <[hidden email]> (on 08/30/04):
> On 30-Aug-2004, David Bateman <[hidden email]> wrote:
>
> | ! error ("%s: Unrecognized or illegal classname", fcn);
>
> Please use "invalid" rather than "illegal", since I believe that no
> laws would be broken if someone passed some other name to this
> function.  :-)

You really want a new patch for this??? Could you make this change before
committing...

Cheers
David

--
David Bateman                                [hidden email]
Motorola CRM                                 +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin    +33 1 69 35 77 01 (Fax)
91193 Gif-Sur-Yvette FRANCE

The information contained in this communication has been classified as:

[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary


Reply | Threaded
Open this post in threaded view
|

Re: zeros, ones, eye with integer type args...

John W. Eaton-6
On 30-Aug-2004, David Bateman <[hidden email]> wrote:

| You really want a new patch for this??? Could you make this change before
| committing...

No, that's not necessary, but I would like people to be aware that we
should not be using "illegal" in error messages or documentation.

Thanks,

jwe


Reply | Threaded
Open this post in threaded view
|

zeros, ones, eye with integer type args...

John W. Eaton-6
In reply to this post by David Bateman-3
On 30-Aug-2004, David Bateman <[hidden email]> wrote:

| Here is a patch to allow ones, zeros and eye to return integer types
| without first creating the floating point matrix. That is
|
| ones (2,"int8")
|
| for example. Also "repmat" was broken with integer types due to its
| use of kron, which doesn't handle integer types. This patch removes
| this limitation.

I applied this patch, then made some additional changes to use the
oct_data_conv::data_type enum in liboctave/data-conv.h and some type
traits so we can use templates instead of macros.

| But doesn't fix kron to allow integer types. The
| function "kron" probably should also be adapted.

OK.

Thanks,

jwe


Reply | Threaded
Open this post in threaded view
|

Re: {Spam?} zeros, ones, eye with integer type args...

Przemek Klosowski
In reply to this post by David Bateman-3

This is rather off topic, but you may find it amusing.
As you can see in the subject, David's recent patch was labeled
as spam by our mail server. Specifically, it  the HOT_NASTY
module gave it a perfect 10.0! I am wondering which words caused it:

       - kron ?
       - matrix ?
       - single ?
       - commune ?
       - classes ?  :)
       - XXX FIXME XXX ?
   
Between indecency filters and terrorism filters, one has to watch
one's words... :)


Reply | Threaded
Open this post in threaded view
|

Re: {Spam?} zeros, ones, eye with integer type args...

David Bateman-3
Hey its not often I score a perfect 10....

D.

According to Przemek Klosowski <[hidden email]> (on 09/01/04):

>
> This is rather off topic, but you may find it amusing.
> As you can see in the subject, David's recent patch was labeled
> as spam by our mail server. Specifically, it  the HOT_NASTY
> module gave it a perfect 10.0! I am wondering which words caused it:
>
>        - kron ?
>        - matrix ?
>        - single ?
>        - commune ?
>        - classes ?  :)
>        - XXX FIXME XXX ?
>    
> Between indecency filters and terrorism filters, one has to watch
> one's words... :)

--
David Bateman                                [hidden email]
Motorola CRM                                 +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin    +33 1 69 35 77 01 (Fax)
91193 Gif-Sur-Yvette FRANCE

The information contained in this communication has been classified as:

[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary