# MethodError: no method matching Float32(::RGB{N0f8})

**URL:** <https://discourse.julialang.org/t/methoderror-no-method-matching-float32-rgb-n0f8/92701>\
**Category:** Machine Learning\
**Created:** [January 9, 2023, 8:45am UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-float32-rgb-n0f8/92701 "2023-01-09T08:45:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [January 9, 2023, 9:13am UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-float32-rgb-n0f8/92701/2 "2023-01-09T09:13:18Z")

</div>

I think you have already been pointed to

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …

but let me point you there again - you are much more likely to receive help here if you provide people with runnable code that reproduces your error. In this example here, your error is produced by a call to `make_minibatch(x_test, y_test)`, but both `x_test` and `y_test` are undefined.

Also make sure to use triple backticks ````` to make your code legible.

The error your getting should be reasonably obvious though - you are trying to convert a value of type `RGB{N0f8}` to `Float32`, and the error is telling you that no method doing this is defined. I don’t know much about image processing but I’m not sure what you would expect the result of a conversion of an RGB object (which presumably consists of three numbers) to Float32 to be.

Maybe this SO answer is relevant:

> <https://stackoverflow.com/questions/74274551/how-to-convert-rgbn0f8-type-to-arrayfloat64>

---

_[View the full topic](https://discourse.julialang.org/t/methoderror-no-method-matching-float32-rgb-n0f8/92701)._
