class_docstr: Tests for :mod:`pykeen.utils`.
class_docstr_tok: ["Tests","for",":","mod",":","`","pykeen.utils","`","."]
docstr: Test complex tensor utilities.
docstr_tok: ["Test","complex","tensor","utilities","."]
code: def test_complex_utils(self):
      """Test complex tensor utilities."""
      re = torch.rand(20, 10)
      im = torch.rand(20, 10)
      x = combine_complex(x_re=re, x_im=im)
      re2, im2 = split_complex(x)
      assert (re2 == re).all()
      assert (im2 == im).all()
  
imports: import functools
  import itertools
  import operator
  import random
  import string
  import timeit
  import unittest
  from typing import Iterable, Tuple
  import numpy
  import pytest
  import torch
  from pykeen.utils import _weisfeiler_lehman_iteration, _weisfeiler_lehman_iteration_approx, calculate_broadcasted_elementwise_result_shape, clamp_norm, combine_complex, compact_mapping, compose, estimate_cost_of_sequence, flatten_dictionary, get_optimal_sequence, get_until_first_blank, iter_weisfeiler_lehman, logcumsumexp, project_entity, set_random_seed, split_complex, tensor_product, tensor_sum
label_desc: Use image node_id 3 for calling the TestUtils obj's underlying member method code with example usage: obj.test_complex_utils() without return types