From fba312fe8dfd4ab72bc3ab5b1bf56c99acfb82f1 Mon Sep 17 00:00:00 2001 From: jverzani Date: Tue, 19 Sep 2023 10:43:22 -0400 Subject: [PATCH] add 2-arg hash --- Project.toml | 2 +- src/types.jl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 03a3998..57dcb42 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "SymPy" uuid = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" -version = "1.1.12" +version = "1.1.13" [deps] CommonEq = "3709ef60-1bee-4518-9f2f-acd86f176c50" diff --git a/src/types.jl b/src/types.jl index 11b1306..6e9bc11 100644 --- a/src/types.jl +++ b/src/types.jl @@ -61,6 +61,7 @@ export Lambda ## this allows most things to flow though PyCall PyCall.PyObject(x::SymbolicObject) = x.__pyobject__ ## Override this so that using symbols as keys in a dict works +hash(x::SymbolicObject, h::UInt64) = hash(PyObject(x), h) hash(x::SymbolicObject) = hash(PyObject(x)) ==(x::SymbolicObject, y::SymbolicObject) = PyObject(x) == PyObject(y)