{"record":{"id":"ba94f14c9716529a","repo":"keras-team/keras","slug":"at-least-one-tensor-in-input-x-is-not-of-type-fl-ba94f1","errorCode":null,"errorMessage":"At least one tensor in input `x` is not of type float.Received: x={x}.","messagePattern":"At least one tensor in input `x` is not of type float\\.Received: x=(.+?)\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/backend/numpy/math.py","lineNumber":156,"sourceCode":"        raise ValueError(\n            \"Input `x` should be a tuple of two tensors - real and imaginary.\"\n            f\"Received: x={x}\"\n        )\n    # `convert_to_tensor` does not support passing complex tensors. We separate\n    # the input out into real and imaginary and convert them separately.\n    real, imag = x\n    # Check shapes.\n    if real.shape != imag.shape:\n        raise ValueError(\n            \"Input `x` should be a tuple of two tensors - real and imaginary.\"\n            \"Both the real and imaginary parts should have the same shape. \"\n            f\"Received: x[0].shape = {real.shape}, x[1].shape = {imag.shape}\"\n        )\n    # Ensure dtype is float.\n    if not np.issubdtype(real.dtype, np.floating) or not np.issubdtype(\n        imag.dtype, np.floating\n    ):\n        raise ValueError(\n            \"At least one tensor in input `x` is not of type float.\"\n            f\"Received: x={x}.\"\n        )\n    complex_input = real + 1j * imag\n    return complex_input\n\n\ndef fft(x):\n    real, imag = jax_fft(x)\n    return np.array(real), np.array(imag)\n\n\ndef fft2(x):\n    real, imag = jax_fft2(x)\n    return np.array(real), np.array(imag)\n\n\ndef ifft2(x):","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/backend/numpy/math.py#L138-L174","documentation":"Error \"At least one tensor in input `x` is not of type float.Received: x={x}.\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/backend/numpy/math.py:156 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7a34a03db60bf60042242d6a556fc3be119046a5","analyzedAt":"2026-08-25T21:25:25.994Z","schemaVersion":2},"datasetVersion":"2026-08-26T02:17:13.382Z"}