List.contains not working

hello,


I got two issues one of them which is marked in red, all X vector has 0 value but when I’m collecting values it is showing some super precised value. That i don’t understand why its working like this.
Another issue is which is in blue, I’m trying to generate boolean mask for values containing 0 but its not working.
Where am i doing wrong? please help.
Thanks.

Because you’re asking if the string contains the number 0, try writing “0” instead :wink:

I tried this not working. :confused:

Neither ths working

In the first screenshot please show the preview under the “string from object” node…

In the second you’re comparing a “integer” with a “double” (try to use the “Object.Type” node to make sure you’re working in the right data type) :slight_smile:


i was trying to filter out all -1,0,1
now this is what i’m getting.

i got the reason behind is all values are have .000000 thats why its behaving like this.
So what is the correct direction for filter out 0 and 1?

Hi @ROY,

As @Jonathan.Olesen said, you are simply not comparing the same type of data :slight_smile: Please see below.

You could if you want integers either floor or ceiling the numbers…

3 Likes


not working.

thanks @Jonathan.Olesen. Now i understand.

I’m stuck on a similar issue. Trying to filter out items with a vector of -1 or 1.

I’ve tried this with strings & numbers and I can only ever get one of the list.contains to produce a ‘true’.
I have used both == and list.contains nodes.

Any ideas?

Good morning, at the output of your math.round node try this code in a code block

x>0||x<0?true:false;
edit: There is a solution 4 posts above
Cordially
christian.stan

1 Like