You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by Petrus Hyvönen <pe...@gmail.com> on 2018/06/04 16:16:33 UTC

Re: [jira] [Commented] (PYLUCENE-41) JArray type issue

Hi Andi,

Do you have a suggestion of where to start chasing this issue? Is it on the
definition of objects in java that makes them uncastable, or...

Seems like others do not use this feature of creating two dimensional
arrays, or are there other methods of creating them?

All the best,
/Petrus


On Mon, Mar 19, 2018 at 10:30 PM, Petrus Hyvönen (JIRA) <ji...@apache.org>
wrote:

>
>     [ https://issues.apache.org/jira/browse/PYLUCENE-41?page=
> com.atlassian.jira.plugin.system.issuetabpanels:comment-
> tabpanel&focusedCommentId=16405482#comment-16405482 ]
>
> Petrus Hyvönen commented on PYLUCENE-41:
> ----------------------------------------
>
> Hi,
>
>
>
> Yes, it's the assignment to the object array that is an issue. This
> assignment worked in JCC 3.0 release version somehow.
>
> Regards
>
> /Petrus
>
>
>
> > JArray type issue
> > -----------------
> >
> >                 Key: PYLUCENE-41
> >                 URL: https://issues.apache.org/jira/browse/PYLUCENE-41
> >             Project: PyLucene
> >          Issue Type: Bug
> >         Environment: windows 7, python 3
> >            Reporter: Petrus Hyvönen
> >            Priority: Major
> >
> > Hi,
> >
> > In JCC 3.0 release version and early(2.7) it is possible to make a
> double array by:
> >
> > {{mask = JArray('object')(5)}}
> > {{for i in range(5)}}
> >  {{    mask[i] = JArray('double')([1.0, 2.0])}}
> > It gives in the <=3.0 following type of 'mask'
> > JArray<object>[<Object: [D@3967e60c>, <Object: [D@60d8c9b7>, ...
> > for svn version it gives a 'TypeError: JArray<double>[1.0, 2.0]' in the
> assignment to mask[i]
> >
> > Not sure this is a bug or a change of how to do things.
> > Best Regards
> > /Petrus
> >
> >
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v7.6.3#76005)
>



-- 
_____________________________________________
Petrus Hyvönen, Uppsala, Sweden
Mobile Phone/SMS:+46 73 803 19 00

Re: [jira] [Commented] (PYLUCENE-41) JArray type issue

Posted by Andi Vajda <va...@apache.org>.
On Mon, 4 Jun 2018, Petrus Hyvönen wrote:

> Hi Andi,
>
> Do you have a suggestion of where to start chasing this issue? Is it on the
> definition of objects in java that makes them uncastable, or...

Yes, start by stepping through the JArray<jobject>::set(...) method, line 
187 in jcc/jcc3/sources/JArray.h and see if it passes all the type checks 
there.

Andi..

>
> Seems like others do not use this feature of creating two dimensional
> arrays, or are there other methods of creating them?
>
> All the best,
> /Petrus
>
>
> On Mon, Mar 19, 2018 at 10:30 PM, Petrus Hyvönen (JIRA) <ji...@apache.org>
> wrote:
>
>>
>>     [ https://issues.apache.org/jira/browse/PYLUCENE-41?page=
>> com.atlassian.jira.plugin.system.issuetabpanels:comment-
>> tabpanel&focusedCommentId=16405482#comment-16405482 ]
>>
>> Petrus Hyvönen commented on PYLUCENE-41:
>> ----------------------------------------
>>
>> Hi,
>>
>>
>>
>> Yes, it's the assignment to the object array that is an issue. This
>> assignment worked in JCC 3.0 release version somehow.
>>
>> Regards
>>
>> /Petrus
>>
>>
>>
>>> JArray type issue
>>> -----------------
>>>
>>>                 Key: PYLUCENE-41
>>>                 URL: https://issues.apache.org/jira/browse/PYLUCENE-41
>>>             Project: PyLucene
>>>          Issue Type: Bug
>>>         Environment: windows 7, python 3
>>>            Reporter: Petrus Hyvönen
>>>            Priority: Major
>>>
>>> Hi,
>>>
>>> In JCC 3.0 release version and early(2.7) it is possible to make a
>> double array by:
>>>
>>> {{mask = JArray('object')(5)}}
>>> {{for i in range(5)}}
>>>  {{    mask[i] = JArray('double')([1.0, 2.0])}}
>>> It gives in the <=3.0 following type of 'mask'
>>> JArray<object>[<Object: [D@3967e60c>, <Object: [D@60d8c9b7>, ...
>>> for svn version it gives a 'TypeError: JArray<double>[1.0, 2.0]' in the
>> assignment to mask[i]
>>>
>>> Not sure this is a bug or a change of how to do things.
>>> Best Regards
>>> /Petrus
>>>
>>>
>>
>>
>>
>> --
>> This message was sent by Atlassian JIRA
>> (v7.6.3#76005)
>>
>
>
>
> -- 
> _____________________________________________
> Petrus Hyvönen, Uppsala, Sweden
> Mobile Phone/SMS:+46 73 803 19 00
>