Hello,
I just want to get rid of this values. so i do it, with 2 boolmasks. but i think there is a better way. Can i combine this filter rules?
there is this issue "" ; null ; Null ,
KR
Andreas
Hello,
I just want to get rid of this values. so i do it, with 2 boolmasks. but i think there is a better way. Can i combine this filter rules?
there is this issue "" ; null ; Null ,
KR
Andreas
Use this in codeblock
x>100000 || x==null ? false:true
You’re getting Null with a capital N? Most probably those are just string values. Try "Null"
or Null
instead of null
.
x>100000 || x=="Null" ? false:true
@theshysnail they are not strings… that are areavalues which are stored in a Parameter.
the infinity, Null and null comes from there
The problem is not the conditional statement. You can see that it’s returning the correct booleans. If you read the error from FilterByBoolMask
it states that it’s merely a warning that the Infinity
value is outside the working range. You actually just need another condition to convert the Infinity
to something within range.
@Nick_Boyts @Elie.Trad @theshysnail
I should never say to a college “it is a easy task for dynamo!”
What is it that you’re trying to do? You can’t convert a null to a string so you’re still going to have issues. I thought you just wanted to filter the out the non-real numbers?
@Nick_Boyts i want to remove all from my value.list thats not a area.Value.
Null
null
infinity
#here_is_nothing
Then you’ll have to do something like I suggested in my first post, which is to convert the Infinity
value to a real number within your working range.
Ok, i give it a try!
I solved the problem… i can live with the warning. my calculated vales get filed correctly! @Elie.Trad
Again, you can bypass the warning by converting the Infinity
to something in range.
string
would work as well.
@Elie.Trad @Nick_Boyts @theshysnail
look at that
OUT = []
for i in IN[0]:
if i >= 99999:
OUT.append(False)
elif i == None :
OUT.append(False)
else:
OUT.append(True)
that works for me so Null + null = None
That’s cause you only gave it 3 booleans. I was just showing you an example with those values. You obviously have to use the appropriate booleans (based on your conditional statement) for your set of values.
But infinity is a value… not a happy one for math purposes, but a value all the same!
I would replace the 0 with a alternative number prior to doing the math.