- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
所以,当我执行 A\b
操作时,我的 Julia 程序中有一个 260 x 260 稀疏矩阵定义为> 其中 b
是 Vector{T} 类型,我得到错误:
ERROR: LoadError: MethodError: no method matching lu!(::SparseArrays.SparseMatrixCSC{Float32, UInt64}, ::Val{true}; check=true)
有没有人对此有任何解决方案?我不想将 A
转换为密集数组,而 b
是一个密集向量。
编辑:
代码是这样的:
using LinearAlgebra, SparseArrays
lhs = sparse(
[1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 3, 4, 5, 6, 7, 8, 3, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9, 10, 5, 6, 7, 8, 9, 10, 7, 8, 9, 10, 11, 12, 7, 8, 9, 10, 11, 12, 9, 10, 11, 12, 13, 14, 9, 10, 11, 12, 13, 14, 11, 12, 13, 14, 15, 16, 11, 12, 13, 14, 15, 16, 13, 14, 15, 16, 17, 18, 13, 14, 15, 16, 17, 18, 15, 16, 17, 18, 19, 20, 15, 16, 17, 18, 19, 20, 17, 18, 19, 20, 21, 22, 17, 18, 19, 20, 21, 22, 19, 20, 21, 22, 23, 24, 19, 20, 21, 22, 23, 24, 21, 22, 23, 24, 25, 26, 21, 22, 23, 24, 25, 26, 23, 24, 25, 26, 27, 28, 23, 24, 25, 26, 27, 28, 25, 26, 27, 28, 29, 30, 25, 26, 27, 28, 29, 30, 27, 28, 29, 30, 31, 32, 27, 28, 29, 30, 31, 32, 29, 30, 31, 32, 33, 34, 29, 30, 31, 32, 33, 34, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 33, 34, 35, 36, 37, 38, 33, 34, 35, 36, 37, 38, 35, 36, 37, 38, 39, 40, 35, 36, 37, 38, 39, 40, 37, 38, 39, 40, 41, 42, 37, 38, 39, 40, 41, 42, 39, 40, 41, 42, 43, 44, 39, 40, 41, 42, 43, 44, 41, 42, 43, 44, 45, 46, 41, 42, 43, 44, 45, 46, 43, 44, 45, 46, 47, 48, 43, 44, 45, 46, 47, 48, 45, 46, 47, 48, 49, 50, 45, 46, 47, 48, 49, 50, 47, 48, 49, 50, 51, 52, 47, 48, 49, 50, 51, 52, 49, 50, 51, 52, 53, 54, 49, 50, 51, 52, 53, 54, 51, 52, 53, 54, 55, 56, 51, 52, 53, 54, 55, 56, 53, 54, 55, 56, 57, 58, 53, 54, 55, 56, 57, 58, 55, 56, 57, 58, 59, 60, 55, 56, 57, 58, 59, 60, 57, 58, 59, 60, 61, 62, 57, 58, 59, 60, 61, 62, 59, 60, 61, 62, 63, 64, 59, 60, 61, 62, 63, 64, 61, 62, 63, 64, 65, 66, 61, 62, 63, 64, 65, 66, 63, 64, 65, 66, 67, 68, 63, 64, 65, 66, 67, 68, 65, 66, 67, 68, 69, 70, 65, 66, 67, 68, 69, 70, 67, 68, 69, 70, 71, 72, 67, 68, 69, 70, 71, 72, 69, 70, 71, 72, 73, 74, 69, 70, 71, 72, 73, 74, 71, 72, 73, 74, 75, 76, 71, 72, 73, 74, 75, 76, 73, 74, 75, 76, 77, 78, 73, 74, 75, 76, 77, 78, 75, 76, 77, 78, 79, 80, 75, 76, 77, 78, 79, 80, 77, 78, 79, 80, 81, 82, 77, 78, 79, 80, 81, 82, 79, 80, 81, 82, 83, 84, 79, 80, 81, 82, 83, 84, 81, 82, 83, 84, 85, 86, 81, 82, 83, 84, 85, 86, 83, 84, 85, 86, 87, 88, 83, 84, 85, 86, 87, 88, 85, 86, 87, 88, 89, 90, 85, 86, 87, 88, 89, 90, 87, 88, 89, 90, 91, 92, 87, 88, 89, 90, 91, 92, 89, 90, 91, 92, 93, 94, 89, 90, 91, 92, 93, 94, 91, 92, 93, 94, 95, 96, 91, 92, 93, 94, 95, 96, 93, 94, 95, 96, 97, 98, 93, 94, 95, 96, 97, 98, 95, 96, 97, 98, 99, 100, 95, 96, 97, 98, 99, 100, 97, 98, 99, 100, 101, 102, 97, 98, 99, 100, 101, 102, 99, 100, 101, 102, 103, 104, 99, 100, 101, 102, 103, 104, 101, 102, 103, 104, 105, 106, 101, 102, 103, 104, 105, 106, 103, 104, 105, 106, 107, 108, 103, 104, 105, 106, 107, 108, 105, 106, 107, 108, 109, 110, 105, 106, 107, 108, 109, 110, 107, 108, 109, 110, 111, 112, 107, 108, 109, 110, 111, 112, 109, 110, 111, 112, 113, 114, 109, 110, 111, 112, 113, 114, 111, 112, 113, 114, 115, 116, 111, 112, 113, 114, 115, 116, 113, 114, 115, 116, 117, 118, 113, 114, 115, 116, 117, 118, 115, 116, 117, 118, 119, 120, 115, 116, 117, 118, 119, 120, 117, 118, 119, 120, 121, 122, 117, 118, 119, 120, 121, 122, 119, 120, 121, 122, 123, 124, 119, 120, 121, 122, 123, 124, 121, 122, 123, 124, 125, 126, 121, 122, 123, 124, 125, 126, 123, 124, 125, 126, 127, 128, 123, 124, 125, 126, 127, 128, 125, 126, 127, 128, 125, 126, 127, 128],
[1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 30, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 33, 33, 33, 33, 33, 33, 34, 34, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 37, 37, 37, 37, 37, 37, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 41, 42, 42, 42, 42, 42, 42, 43, 43, 43, 43, 43, 43, 44, 44, 44, 44, 44, 44, 45, 45, 45, 45, 45, 45, 46, 46, 46, 46, 46, 46, 47, 47, 47, 47, 47, 47, 48, 48, 48, 48, 48, 48, 49, 49, 49, 49, 49, 49, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 52, 52, 52, 52, 52, 52, 53, 53, 53, 53, 53, 53, 54, 54, 54, 54, 54, 54, 55, 55, 55, 55, 55, 55, 56, 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, 57, 58, 58, 58, 58, 58, 58, 59, 59, 59, 59, 59, 59, 60, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 61, 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 64, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 68, 68, 68, 68, 68, 68, 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, 74, 74, 74, 74, 74, 74, 75, 75, 75, 75, 75, 75, 76, 76, 76, 76, 76, 76, 77, 77, 77, 77, 77, 77, 78, 78, 78, 78, 78, 78, 79, 79, 79, 79, 79, 79, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81, 81, 82, 82, 82, 82, 82, 82, 83, 83, 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, 85, 85, 85, 85, 85, 85, 86, 86, 86, 86, 86, 86, 87, 87, 87, 87, 87, 87, 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, 89, 89, 90, 90, 90, 90, 90, 90, 91, 91, 91, 91, 91, 91, 92, 92, 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, 94, 94, 94, 94, 94, 94, 95, 95, 95, 95, 95, 95, 96, 96, 96, 96, 96, 96, 97, 97, 97, 97, 97, 97, 98, 98, 98, 98, 98, 98, 99, 99, 99, 99, 99, 99, 100, 100, 100, 100, 100, 100, 101, 101, 101, 101, 101, 101, 102, 102, 102, 102, 102, 102, 103, 103, 103, 103, 103, 103, 104, 104, 104, 104, 104, 104, 105, 105, 105, 105, 105, 105, 106, 106, 106, 106, 106, 106, 107, 107, 107, 107, 107, 107, 108, 108, 108, 108, 108, 108, 109, 109, 109, 109, 109, 109, 110, 110, 110, 110, 110, 110, 111, 111, 111, 111, 111, 111, 112, 112, 112, 112, 112, 112, 113, 113, 113, 113, 113, 113, 114, 114, 114, 114, 114, 114, 115, 115, 115, 115, 115, 115, 116, 116, 116, 116, 116, 116, 117, 117, 117, 117, 117, 117, 118, 118, 118, 118, 118, 118, 119, 119, 119, 119, 119, 119, 120, 120, 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, 122, 122, 122, 122, 122, 122, 123, 123, 123, 123, 123, 123, 124, 124, 124, 124, 124, 124, 125, 125, 125, 125, 125, 125, 126, 126, 126, 126, 126, 126, 127, 127, 127, 127, 128, 128, 128, 128],
Float32[9375.0, 625.0, -2187.5, -2812.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 9375.0, 625.0, -2187.5, -2812.5, -2812.5, -2187.5, 625.0, 9375.0, -2812.5, -2187.5, -2187.5, -2812.5, 4687.5, 312.5, -2812.5, -2187.5, 312.5, 4687.5],
128,
128
)
rhs = Float32[-6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -6.1035156, -3.0517578, -3.0517578]
x = lhs\rhs
这是我能找到的重现错误的最小代码示例。请将代码粘贴到 IDE 中查看,因为矩阵是 128 x 128。很抱歉代码太长。
最佳答案
问题是 lu!
对于 Float32 类型的稀疏矩阵不存在。在内部,目前 Julia 在内部将 Float32 稀疏矩阵提升为 Float64 以解决系统问题。因此,如果您想使用稀疏求解器,我建议不要使用 Float32,而继续使用 Float64。
julia> typeof(lhs)
SparseMatrixCSC{Float32, Int64}
julia> lu!(lhs)
ERROR: MethodError: no method matching lu!(::SparseMatrixCSC{Float32, Int64})
Closest candidates are:
lu!(::StridedMatrix{var"#s857"} where var"#s857"<:Union{Float32, Float64, ComplexF32, ComplexF64}; check) at ~/Desktop/Julia/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/LinearAlgebra/src/lu.jl:79
在 https://github.com/JuliaLang/SuiteSparse.jl/issues/54 中提交了问题
关于julia - 在稀疏矩阵和密集向量 Julia 上使用反斜杠运算符时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70648351/
假设我有两个矩阵,每个矩阵有两列和不同的行数。我想检查并查看一个矩阵的哪些对在另一个矩阵中。如果这些是一维的,我通常只会做 a %in% x得到我的结果。 match似乎只适用于向量。 > a
关闭。这个问题是opinion-based .它目前不接受答案。 想要改进这个问题? 更新问题,以便 editing this post 可以用事实和引用来回答它. 关闭 9 个月前。 Improv
我只处理过 DirectX 矩阵 我读过一些文章,说不能将 DirectX 矩阵数学库用于 openGL 矩阵。 但我也读过,如果你的数学是一致的,你可以获得类似的结果。那只会让我更加困惑。 任何人都
我编写了一个C++代码来解决线性系统A.x = b,其中A是一个对称矩阵,方法是首先使用LAPACK(E)对角矩阵A = V.D.V^T(因为以后需要特征值),然后求解x = A^-1.b = V^T
我遇到了问题。我想创建二维数组 rows=3 cols=2我的代码如下 int **ptr; int row=3; int col=2; ptr=new int *[col]; for (int i=
我有一个 3d mxnxt 矩阵,我希望能够提取 t 2d nxm 矩阵。在我的例子中,我有一个 1024x1024x10 矩阵,我想要 10 张图像显示给我。 这不是 reshape ,我每次只需要
我在 MATLAB 中有一个 3d 矩阵 (n-by-m-by-t) 表示一段时间内网格中的 n-by-m 测量值.我想要一个二维矩阵,其中空间信息消失了,只剩下 n*m 随着时间 t 的测量值(即:
作为一个简化的示例,我有一个 3D numpy 矩阵,如下所示: a = np.array([[[1,2], [4,np.nan], [7,
作为一个简化的示例,我有一个 3D numpy 矩阵,如下所示: a = np.array([[[1,2], [4,np.nan], [7,
使用 eigen2 , 并给定一个矩阵 A a_0_0, a_0_1, a_0_2, ... a_1_0, a_1_0, a_1_2, ... ... 和一个矩阵B: b_0_0, b_0_1, b_
我想知道如何获得下面的布局。 在中型和大型设备上,我希望有 2 行和 2 列的布局(2 x 2 矩阵)。 在小型(和超小型)设备上或调整为小型设备时,我想要一个 4 行和 1 列的矩阵。 我将通过 a
有什么方法可以向量化以下内容: for i = 1:6 te = k(:,:,:,i).*(c(i)); end 我正在尝试将 4D 矩阵 k 乘以向量 c,方法是将其
如何从填充有 1 和 0 的矩阵中抽取 n 个随机点的样本? a=rep(0:1,5) b=rep(0,10) c=rep(1,10) dataset=matrix(cbind(a,b,c),nrow
我正在尝试创建一个包含 X 个 X 的矩阵。以下代码生成从左上角到右下角的 X 对 Angular 线,而不是从右上角到左下角的 X 对 Angular 线。我不确定从哪里开始。是否应该使用新变量创建
我想在 python 中创建一个每行三列的矩阵,并能够通过任何一行对它们进行索引。矩阵中的每个值都是唯一的。 据我所知,我可以设置如下矩阵: matrix = [["username", "name"
我有点迷茫 我创建了一个名为 person 的类,它具有 age 和 name 属性(以及 get set 方法)。然后在另一个类中,我想创建一个 persons 数组,其中每个人都有不同的年龄和姓名
我有 n 个类,它们要么堆叠,要么不堆叠。所有这些类都扩展了同一个类 (CellObject)。我知道更多类将添加到此列表中,我想创建一种易于在一个地方操纵“可堆叠性”的方法。 我正在考虑创建一个矩阵
我有一个包含 x 个字符串名称及其关联 ID 的文件。本质上是两列数据。 我想要的是一个格式为 x x x 的相关样式表(将相关数据同时作为 x 轴和 y 轴),但我想要 fuzzywuzzy 库的函
机器学习与传统编程的一个重要区别在于机器学习比传统编程涉及了更多的数学知识。不过,随着机器学习的飞速发展,各种框架应运而生,在数据分析等应用中使用机器学习时,使用现成的库和框架成为常态,似乎越来越不需
当我在 julia 中输入这个错误跳转但我不知道为什么,它应该工作。/ julia> A = [1 2 3 4; 5 6 7 8; 1 2 3 4; 5 6 7 8] 4×4 Array{Int64,
我是一名优秀的程序员,十分优秀!