Checking if NDArray is null returns wrong results
If I try to check if an NDArray is null, I get strange behavior:
NDArray n = null;
bool b1 = n is null; // TRUE
bool b2 = n == null; // FALSE!
I saw in NDArray.Operators.cs that if the second value is null, the result is false: https://github.com/SciSharp/TensorFlow.NET/blob/ce3ddb2321312894ef4355b2809802f7d6f62e1f/src/TensorFlowNET.Core/NumPy/NDArray.Operators.cs#L28-L29
Is that a wanted behavior? I think that if both values are null, the result should be true.
Just got into this after migrating from the older version that used NumSharp. Almost had a heart attack by watching an expression if (x != null) throwing a NullReferenceException.
It looks like it was an intended behavior, according to the implementation, but wait, this is not a Python anymore! Despite there is an "is" operator in C# now, this is not a common idiomatic form. No one should expect from "x == null" anything else except checking for null! In other words, let's not try to turn C# into a Python, please?
Solved https://github.com/SciSharp/TensorFlow.NET/commit/5821275145e5123d1acbc4094acd2baef06ac138